fix: handle editor errors, text editor preview story

This commit is contained in:
MTG2000
2022-05-01 11:51:56 +03:00
parent b2209db14d
commit e40538ef7e
10 changed files with 102 additions and 26 deletions

View File

@@ -14,11 +14,11 @@ export default function SaveModule(props: Props) {
name: props.name ?? 'content'
})
const { getMarkdown } = useHelpers();
const { getMarkdown, getHTML } = useHelpers();
const changeCallback = useDebouncedCallback(ctx => {
const { state } = ctx;
onChange(getMarkdown(state));
onChange(getHTML(state));
}, [], 500)
useRemirrorContext(changeCallback)