Skip to content
Snippets Groups Projects
Commit d3b50525 authored by chris's avatar chris
Browse files

fix content save

parent 9fc73b22
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,10 @@ const getDocContent = (schema, serializer, targetFormat, context) => { ...@@ -35,7 +35,10 @@ const getDocContent = (schema, serializer, targetFormat, context) => {
let content = ''; let content = '';
alterNotesSchema(schema); alterNotesSchema(schema);
if (targetFormat === 'JSON') { if (targetFormat === 'JSON') {
content = context.app.context.pmViews.main.state.doc.content.toJSON(); content = {
type: 'doc',
content: context.app.context.pmViews.main.state.doc.content.toJSON(),
};
} else { } else {
const serialize = serializer(schema); const serialize = serializer(schema);
content = serialize(context.app.context.pmViews.main.state.doc.content); content = serialize(context.app.context.pmViews.main.state.doc.content);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment