diff --git a/src/editor/index.js b/src/editor/index.js index 6fa826e..045a68a 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -37,7 +37,7 @@ const ACTTION = { unordered: 'insertUnorderedList' } -const DEFAULT_TOOLS = [ +const TOOLBAR = [ 'font', 'color', 'bold', @@ -52,7 +52,8 @@ const DEFAULT_TOOLS = [ 'right', 'link', 'image', - 'fullscreen' + 'fullscreen', + 'copy' ] const COLORS = [ @@ -87,18 +88,6 @@ class Editor extends Component { static watches = ['value'] static props = { - toolbar: { - type: String, - default: '', - attribute: false, - observer(v) { - if (v === null) { - this.#toolbar = [...DEFAULT_TOOLS] - } else if (v) { - this.#toolbar = v.split(',').map(it => it.trim()) - } - } - }, readonly: { type: Boolean, observer(v) { @@ -407,7 +396,6 @@ class Editor extends Component { ` ] - #toolbar = [] #value = '' #cache = { bar: 0, y: 0 } #gridx = 0 @@ -794,15 +782,10 @@ class Editor extends Component { } render() { - toolbar = [ - ...(this.#toolbar.length ? this.#toolbar : DEFAULT_TOOLS), - 'copy' - ] - return html`