From 5eb7b205b3aed1f1e6fd5bbec41c947df46d4f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 5 Nov 2019 12:46:09 +0100 Subject: Move to @nextcloud packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/EditorFactory.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/EditorFactory.js') 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]') - } + }, } } -- cgit v1.2.3