mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-24 08:44:28 +01:00
fix: handle editor errors, text editor preview story
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user