Skip to content

Commit

Permalink
fix(plaintext): allow adding multiple empty lines at the end
Browse files Browse the repository at this point in the history
Pressing enter three times exits a CodeBlock element by default.
Disable this by setting `exitOnTripleEnter` to false in plaintext editor.

Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud committed Oct 8, 2024
1 parent d8fabf7 commit 89b6bef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/EditorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ const createEditor = ({ language, onCreate = () => {}, onUpdate = () => {}, exte
FocusTrap,
]
} else {
defaultExtensions = [PlainText, CodeBlockLowlight.configure({ lowlight, defaultLanguage: language })]
defaultExtensions = [
PlainText,
CodeBlockLowlight.configure({
lowlight,
defaultLanguage: language,
exitOnTripleEnter: false,
}),
]
}

return new Editor({
Expand Down

0 comments on commit 89b6bef

Please sign in to comment.