Revert "fix 125"

This commit is contained in:
fantasticit 2022-07-14 22:45:38 +08:00 committed by GitHub
parent 7c40a12e56
commit c1a3044d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View File

@ -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);

View File

@ -37,10 +37,6 @@ function fixNode(doc) {
};
}
});
if (!node.content || !node.content.length) {
node.content = [{ attrs: {}, type: 'paragraph' }];
}
}
if (node.content) {