Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2021-07-17 01:05:15 +0300
committernextcloud-command <nextcloud-command@users.noreply.github.com>2021-10-06 12:38:50 +0300
commitfbbab0bd1ece5c3a9dc7e2e1b3ffe7876c2b08b4 (patch)
tree2b771bfdc137ecfa7920c383db28fdecdd88d2e2 /src/EditorFactory.js
parentc3806ce170d57583d8f7ec53fe3b47910eb94c14 (diff)
allow to insert text after trailing codeblock
Signed-off-by: szaimen <szaimen@e.mail.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'src/EditorFactory.js')
-rw-r--r--src/EditorFactory.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/EditorFactory.js b/src/EditorFactory.js
index f49a77c12..c88de2dbb 100644
--- a/src/EditorFactory.js
+++ b/src/EditorFactory.js
@@ -30,6 +30,7 @@ import {
CodeBlockHighlight,
HorizontalRule,
History,
+ TrailingNode,
Placeholder,
} from 'tiptap-extensions'
import { Strong, Italic, Strike, Link } from './marks'
@@ -103,6 +104,10 @@ const createEditor = ({ content, onInit, onUpdate, extensions, enableRichEditing
extensions: [
...richEditingExtensions,
new History(),
+ new TrailingNode({
+ node: 'paragraph',
+ notAfter: ['paragraph'],
+ }),
].concat(extensions),
useBuiltInExtensions: enableRichEditing,
})