diff --git a/docs/components/text-editor.md b/docs/components/text-editor.md index 8c16d8a2c..8da007a36 100644 --- a/docs/components/text-editor.md +++ b/docs/components/text-editor.md @@ -32,6 +32,7 @@ let fixedMenuButtons = [ 'Align Left', 'Align Center', 'Align Right', + 'Align Justify', 'FontColor', 'Separator', 'Image', diff --git a/src/components/TextEditor/TextEditorBubbleMenu.vue b/src/components/TextEditor/TextEditorBubbleMenu.vue index 1bd611abc..af3be4a56 100644 --- a/src/components/TextEditor/TextEditorBubbleMenu.vue +++ b/src/components/TextEditor/TextEditorBubbleMenu.vue @@ -46,6 +46,7 @@ export default { 'Align Left', 'Align Center', 'Align Right', + 'Align Justify', 'Separator', 'Image', 'Video', diff --git a/src/components/TextEditor/TextEditorFixedMenu.vue b/src/components/TextEditor/TextEditorFixedMenu.vue index 6b8d8d99e..33da41be2 100644 --- a/src/components/TextEditor/TextEditorFixedMenu.vue +++ b/src/components/TextEditor/TextEditorFixedMenu.vue @@ -37,6 +37,7 @@ export default { 'Align Left', 'Align Center', 'Align Right', + 'Align Justify', 'FontColor', 'Separator', 'Image', diff --git a/src/components/TextEditor/commands.js b/src/components/TextEditor/commands.js index 441cec78e..d4fd24c6e 100644 --- a/src/components/TextEditor/commands.js +++ b/src/components/TextEditor/commands.js @@ -12,6 +12,7 @@ import Underline from './icons/underline.vue' import AlignCenter from './icons/align-center.vue' import AlignLeft from './icons/align-left.vue' import AlignRight from './icons/align-right.vue' +import AlignJustify from './icons/align-justify.vue' import FontColor from './icons/font-color.vue' import ListOrdered from './icons/list-ordered.vue' import ListUnordered from './icons/list-unordered.vue' @@ -128,6 +129,12 @@ export default { action: (editor) => editor.chain().focus().setTextAlign('right').run(), isActive: (editor) => editor.isActive({ textAlign: 'right' }), }, + 'Align Justify': { + label: 'Align Justify', + icon: AlignJustify, + action: (editor) => editor.chain().focus().setTextAlign('justify').run(), + isActive: (editor) => editor.isActive({ textAlign: 'justify' }), + }, FontColor: { label: 'Font Color', icon: FontColor,