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 <[email protected]>
  • Loading branch information
max-nextcloud committed Oct 8, 2024
1 parent df639e3 commit 0d2bc64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/EditorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ const createPlainEditor = ({ language, extensions = [] } = {}) => {
editorProps,
extensions: [
PlainText,
CodeBlockLowlight.configure({ lowlight, defaultLanguage: language }),
CodeBlockLowlight.configure({
lowlight,
defaultLanguage: language,
exitOnTripleEnter: false,
}),
...extensions,
]

Check warning on line 73 in src/EditorFactory.js

View workflow job for this annotation

GitHub Actions / NPM lint

Missing trailing comma
})
Expand Down

0 comments on commit 0d2bc64

Please sign in to comment.