From b9be0f153af789b60de116da6dab6ecb1cbf85d7 Mon Sep 17 00:00:00 2001 From: "Phu.Nguyen" Date: Tue, 24 Nov 2020 10:47:01 +0700 Subject: [PATCH 1/2] fix clear format --- src/editor/Editr.vue | 8 +++++--- src/editor/locales/index.js | 2 +- src/editor/modules/image.vue | 3 ++- src/editor/modules/removeFormat.js | 7 ++++++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/editor/Editr.vue b/src/editor/Editr.vue index 74e5b02..828dc5c 100644 --- a/src/editor/Editr.vue +++ b/src/editor/Editr.vue @@ -160,11 +160,13 @@ export default { } } }, - exec (cmd, arg, sel){ + exec (cmd, arg, sel, clearSelectionAfter){ sel !== false && this.selection && this.restoreSelection(this.selection); document.execCommand(cmd, false, arg||""); - this.clearSelection(); - + if (clearSelectionAfter !== false) { + this.clearSelection(); + } + this.$nextTick(this.emit); }, diff --git a/src/editor/locales/index.js b/src/editor/locales/index.js index 6643034..5953262 100644 --- a/src/editor/locales/index.js +++ b/src/editor/locales/index.js @@ -8,7 +8,7 @@ import spanish from "./spanish"; export default { dutch, hungarian, - german, + italian, english, portuguese, spanish, diff --git a/src/editor/modules/image.vue b/src/editor/modules/image.vue index 03bdad4..8e11e96 100644 --- a/src/editor/modules/image.vue +++ b/src/editor/modules/image.vue @@ -12,7 +12,8 @@