mirror of
https://github.com/fantasticit/think.git
synced 2026-09-01 15:10:55 +08:00
fix 125
This commit is contained in:
@@ -136,7 +136,6 @@ export const DocumentExporter: React.FC<IProps> = ({ document, render }) => {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
console.log('doc', editor, document);
|
||||
const c = safeJSONParse(document && document.content);
|
||||
const json = c.default || c;
|
||||
editor.commands.setContent(json);
|
||||
|
||||
+4
@@ -37,6 +37,10 @@ function fixNode(doc) {
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (!node.content || !node.content.length) {
|
||||
node.content = [{ attrs: {}, type: 'paragraph' }];
|
||||
}
|
||||
}
|
||||
|
||||
if (node.content) {
|
||||
|
||||
Reference in New Issue
Block a user