diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-02-06 13:08:38 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-02-06 13:09:33 +0300 |
commit | 08bf1c9de74ad0d6e502d767b603cc2dffae781d (patch) | |
tree | cc8bd5073162c6d58cf13efe77e20e4f0e6f44a8 /src | |
parent | df97235cae23398d16ce9b40a7b2f405c1229c1e (diff) |
Add alignment as formatting option in text editor
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/TextEditor.vue | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/components/TextEditor.vue b/src/components/TextEditor.vue index 1c24c900e..0616e513b 100644 --- a/src/components/TextEditor.vue +++ b/src/components/TextEditor.vue @@ -32,6 +32,7 @@ <script> import CKEditor from '@ckeditor/ckeditor5-vue' +import AlignmentPlugin from '@ckeditor/ckeditor5-alignment/src/alignment' import Editor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor' import EssentialsPlugin from '@ckeditor/ckeditor5-essentials/src/essentials' import BlockQuotePlugin from '@ckeditor/ckeditor5-block-quote/src/blockquote' @@ -73,18 +74,8 @@ export default { const toolbar = ['undo', 'redo'] if (this.html) { - plugins.push( - ...[ - EssentialsPlugin, - ParagraphPlugin, - BoldPlugin, - ItalicPlugin, - HeadingPlugin, - BlockQuotePlugin, - LinkPlugin, - ] - ) - toolbar.unshift(...['bold', 'italic', 'heading', 'blockquote', 'link']) + plugins.push(...[HeadingPlugin, AlignmentPlugin, BoldPlugin, ItalicPlugin, BlockQuotePlugin, LinkPlugin]) + toolbar.unshift(...['heading', 'alignment', 'bold', 'italic', 'blockquote', 'link']) } return { |