Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EditorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const serializePlainText = (tiptap) => {
const doc = tiptap.getJSON()

if (doc.content.length !== 1 || typeof doc.content[0].content === 'undefined' || doc.content[0].content.length !== 1) {
if (doc.content[0].type === 'code_block' && typeof doc.content[0].content === 'undefined') {
if (doc.content[0].type === 'codeBlock' && typeof doc.content[0].content === 'undefined') {
return ''
}
throw new SerializeException('Failed to serialize document to plain text')
Expand Down
1 change: 1 addition & 0 deletions src/helpers/mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const extensionHighlight = {
ml: 'ocaml',
rs: 'rust',
sci: 'scilab',
txt: 'plaintext',
vb: 'vbnet',
vbs: 'vbscript',
}
Expand Down