@firecms/editor 3.0.0-beta.14 → 3.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +5 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -1912,8 +1912,13 @@ const FireCMSEditor = ({
|
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
1914
|
}, [deferredHighlight?.from, deferredHighlight?.to]);
|
|
1915
|
+
const firstUpdateRef = React.useRef(true);
|
|
1915
1916
|
const onEditorUpdate = (editor) => {
|
|
1916
1917
|
editorRef.current = editor;
|
|
1918
|
+
if (firstUpdateRef.current) {
|
|
1919
|
+
firstUpdateRef.current = false;
|
|
1920
|
+
return;
|
|
1921
|
+
}
|
|
1917
1922
|
if (onMarkdownContentChange) {
|
|
1918
1923
|
const markdown = editorRef.current.storage.markdown.getMarkdown();
|
|
1919
1924
|
onMarkdownContentChange?.(addLineBreakAfterImages(markdown));
|