diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-06-11 11:38:01 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-06-11 11:40:52 +0300 |
commit | 5792c6c0993e4b22b2e39db9ec511502b5e654ff (patch) | |
tree | 7c748572b57cfe9086ec3696b4746c090d2a6c21 /src/EditorFactory.js | |
parent | 71bb5fbd1f9232f8a6e08dbd925c9c875f402045 (diff) |
Fix code style and add missing files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/EditorFactory.js')
-rw-r--r-- | src/EditorFactory.js | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/EditorFactory.js b/src/EditorFactory.js index 2e2e435fc..871164aac 100644 --- a/src/EditorFactory.js +++ b/src/EditorFactory.js @@ -19,11 +19,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -import {Editor} from 'tiptap'; +import { Editor } from 'tiptap' import { HardBreak, Heading, - Bold, Code, Link, BulletList, @@ -37,31 +36,30 @@ import { import { Strong, Italic } from './marks' import MarkdownIt from 'markdown-it' -const createEditor = ({content, onUpdate, extensions}) => { - extensions = extensions ? extensions : [] +const createEditor = ({ content, onUpdate, extensions }) => { + extensions = extensions || [] return new Editor({ content: content, onUpdate: onUpdate, extensions: [ - new HardBreak, - new Heading, - new Code, - new Strong, - new Italic, - new BulletList, - new OrderedList, - new Blockquote, - new CodeBlock, - new ListItem, - new Link, - new Image, + new HardBreak(), + new Heading(), + new Code(), + new Strong(), + new Italic(), + new BulletList(), + new OrderedList(), + new Blockquote(), + new CodeBlock(), + new ListItem(), + new Link(), + new Image(), new History() - ].concat(extensions), + ].concat(extensions) }) } -const markdownit = MarkdownIt('commonmark', {html: false}); - +const markdownit = MarkdownIt('commonmark', { html: false }) export default createEditor -export { markdownit, createEditor} +export { markdownit, createEditor } |