Skip to content

Commit

Permalink
Only register trailing node for rich text editing
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Oct 28, 2021
1 parent 5190221 commit 87afe94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/EditorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ const createEditor = ({ content, onInit, onUpdate, extensions, enableRichEditing
emptyNodeText: t('text', 'Add notes, lists or links …'),
showOnlyWhenEditable: true,
}),
new TrailingNode({
node: 'paragraph',
notAfter: ['paragraph'],
}),
]
} else {
richEditingExtensions = [
Expand All @@ -104,10 +108,6 @@ const createEditor = ({ content, onInit, onUpdate, extensions, enableRichEditing
extensions: [
...richEditingExtensions,
new History(),
new TrailingNode({
node: 'paragraph',
notAfter: ['paragraph'],
}),
].concat(extensions),
useBuiltInExtensions: enableRichEditing,
})
Expand Down

0 comments on commit 87afe94

Please sign in to comment.