mirror of https://github.com/fantasticit/think.git
Merge pull request #127 from fantasticit/revert-126-fix/125
commit
6a608a0b33
|
@ -136,6 +136,7 @@ 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);
|
||||
|
|
|
@ -37,10 +37,6 @@ function fixNode(doc) {
|
|||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (!node.content || !node.content.length) {
|
||||
node.content = [{ attrs: {}, type: 'paragraph' }];
|
||||
}
|
||||
}
|
||||
|
||||
if (node.content) {
|
||||
|
|
Loading…
Reference in New Issue