Skip to content

Commit 82b08aa

Browse files
committed
feat: add html and source editing support
Signed-off-by: greta <gretadoci@gmail.com>
1 parent 7f7046e commit 82b08aa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/components/TextEditor.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
Base64UploadAdapter,
3131
BlockQuote,
3232
Bold,
33-
DecoupledEditor,
33+
ClassicEditor,
3434
DropdownView,
3535
Essentials,
3636
FindAndReplace,
@@ -46,6 +46,7 @@ import {
4646
Mention,
4747
Paragraph,
4848
RemoveFormat,
49+
SourceEditing,
4950
Strikethrough,
5051
Subscript,
5152
Superscript,
@@ -127,7 +128,7 @@ export default {
127128
FindAndReplace,
128129
GeneralHtmlSupport,
129130
]
130-
const toolbar = ['undo', 'redo']
131+
const toolbar = ['sourceEditing', 'undo', 'redo']
131132
132133
if (this.html) {
133134
plugins.push(...[
@@ -148,6 +149,7 @@ export default {
148149
RemoveFormat,
149150
Base64UploadAdapter,
150151
MailPlugin,
152+
SourceEditing,
151153
])
152154
toolbar.unshift(...[
153155
'heading',
@@ -177,7 +179,7 @@ export default {
177179
emojiTribute: null,
178180
textSmiles: [],
179181
ready: false,
180-
editor: DecoupledEditor,
182+
editor: ClassicEditor,
181183
config: {
182184
licenseKey: 'GPL',
183185
placeholder: this.placeholder,

0 commit comments

Comments
 (0)