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 authored and backportbot[bot] committed Oct 9, 2024
1 parent e4c5e7e commit ec0b20a
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 @@ -66,7 +66,14 @@ const createEditor = ({ language, onCreate = () => {}, onUpdate = () => {}, exte
}),
]
} 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 ec0b20a

Please sign in to comment.