diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-11-05 14:46:09 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-11-05 14:46:09 +0300 |
commit | 5eb7b205b3aed1f1e6fd5bbec41c947df46d4f39 (patch) | |
tree | 89b62bd7485689e6f226677e34c3ca22e7e41804 /src/EditorFactory.js | |
parent | b6a2f9c87d4b46476f5a343d9bec252886a3d34f (diff) |
Move to @nextcloud packages
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/EditorFactory.js')
-rw-r--r-- | src/EditorFactory.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/EditorFactory.js b/src/EditorFactory.js index 87a120e8f..b9acc42dd 100644 --- a/src/EditorFactory.js +++ b/src/EditorFactory.js @@ -33,7 +33,7 @@ import { CodeBlockHighlight, HorizontalRule, History, - Placeholder + Placeholder, } from 'tiptap-extensions' import { Strong, Italic, Strike } from './marks' import { Image, PlainTextDocument } from './nodes' @@ -80,16 +80,16 @@ const createEditor = ({ content, onInit, onUpdate, extensions, enableRichEditing new Placeholder({ emptyNodeClass: 'is-empty', emptyNodeText: 'Add notes, lists or links …', - showOnlyWhenEditable: true - }) + showOnlyWhenEditable: true, + }), ] } else { richEditingExtensions = [ new PlainTextDocument(), new Text(), new CodeBlockHighlight({ - ...languages - }) + ...languages, + }), ] } extensions = extensions || [] @@ -99,9 +99,9 @@ const createEditor = ({ content, onInit, onUpdate, extensions, enableRichEditing onUpdate: onUpdate, extensions: [ ...richEditingExtensions, - new History() + new History(), ].concat(extensions), - useBuiltInExtensions: enableRichEditing + useBuiltInExtensions: enableRichEditing, }) } @@ -117,7 +117,7 @@ const createMarkdownSerializer = (_nodes, _marks) => { .filter(([, node]) => node.toMarkdown) .reduce((items, [name, { toMarkdown }]) => ({ ...items, - [name]: toMarkdown + [name]: toMarkdown, }), {}) const marks = Object @@ -125,7 +125,7 @@ const createMarkdownSerializer = (_nodes, _marks) => { .filter(([, node]) => node.toMarkdown) .reduce((items, [name, { toMarkdown }]) => ({ ...items, - [name]: toMarkdown + [name]: toMarkdown, }), {}) return { serializer: new MarkdownSerializer( @@ -135,7 +135,7 @@ const createMarkdownSerializer = (_nodes, _marks) => { serialize: function(content, options) { return this.serializer.serialize(content, { ...options, tightLists: true }).split('\\[ \\]').join('[ ]') .split('\\[x\\]').join('[x]') - } + }, } } |