diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js index 63713c191a..f44113c00a 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js @@ -337,7 +337,7 @@ export default Component.extend({ didInsertElement() { this._super(...arguments); - let editorElement = this.element.querySelector('.koenig-editor__editor'); + let editorElement = this.element.querySelector('[data-kg="editor"]'); this._pasteHandler = run.bind(this, this.handlePaste); editorElement.addEventListener('paste', this._pasteHandler); @@ -349,7 +349,7 @@ export default Component.extend({ this._super(...arguments); let editor = this.editor; if (!editor.hasRendered) { - let editorElement = this.element.querySelector('.koenig-editor__editor'); + let editorElement = this.element.querySelector('[data-kg="editor"]'); this._isRenderingEditor = true; editor.render(editorElement); this._isRenderingEditor = false; @@ -358,7 +358,7 @@ export default Component.extend({ willDestroyElement() { let editor = this.editor; - let editorElement = this.element.querySelector('.koenig-editor__editor'); + let editorElement = this.element.querySelector('[data-kg="editor"]'); editorElement.removeEventListener('paste', this._pasteHandler); editor.destroy(); diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js index b90710ff7e..d16d5738cd 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-slash-menu.js @@ -198,7 +198,7 @@ export default Component.extend({ // clicks on the menu but not on a button should be ignored so that the // cursor position isn't lost - } else if (!event.target.closest('.koenig-cardmenu-card')) { + } else if (!event.target.closest('[data-kg="cardmenu-card"]')) { event.preventDefault(); } }, diff --git a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-editor.hbs b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-editor.hbs index 2695e13ab5..c49519c8ba 100644 --- a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-editor.hbs +++ b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-editor.hbs @@ -1,5 +1,5 @@ -
-
+
+
{{!-- pop-up markup toolbar is shown when there's a selection --}} diff --git a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-plus-menu.hbs b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-plus-menu.hbs index 23dd41bff7..00b3cf28ed 100644 --- a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-plus-menu.hbs +++ b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-plus-menu.hbs @@ -11,19 +11,19 @@
Primary
--}} -
+
{{svg-jar "koenig/markdown" class="w8 h8 stroke-midgrey"}}
Markdown
-
+
{{svg-jar "koenig/image" class="w8 h8 stroke-midgrey"}}
Image
-
+
{{svg-jar "koenig/html" class="w8 h8 stroke-midgrey"}}
HTML
-
+
{{svg-jar "koenig/divider" class="w8 h8 stroke-midgrey"}}
Divider
diff --git a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-slash-menu.hbs b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-slash-menu.hbs index 658b318126..9392170bef 100644 --- a/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-slash-menu.hbs +++ b/ghost/admin/lib/koenig-editor/addon/templates/components/koenig-slash-menu.hbs @@ -1,7 +1,7 @@ {{#if showMenu}}
{{#each items as |item|}} -
+
{{svg-jar item.icon class="w8 h8 stroke-midgrey"}}
{{item.label}}