Understand the default editor content structure
mainThe editor uses a JSON-based document format (compatible with Tiptap/ProseMirror) to represent content. The defaultEditorContent object provides a template that includes various node types such as heading, paragraph, codeBlock, orderedList, taskList, image, twitter, and math. This structure can be used to initialize the editor with pre-defined content.
{
"type": "doc",
"content": [
{
"type": "heading",
"attrs": { "level": 2 },
"content": [{ "type": "text", "text": "Introducing Novel" }]
},
{
"type": "paragraph",
"content": [
{ "type": "text", "text": "Novel is a Notion-style WYSIWYG editor..." }
]
}
]
}