editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

Documentation vague on position of buttons

Open matteobaldini opened this issue 1 year ago • 3 comments

I can't find information on how to force the position of the buttons next to the blocks.

Example: Screenshot 2023-07-07 at 14 14 37

Is it possible have then in a specific position (right / left)?

matteobaldini avatar Jul 07 '23 12:07 matteobaldini

@matteobaldini have you found a solution? my plus+tunes button are sometimes switching from right to left, when i load the editor empty the buttons are often left, later when reloading the page with content they are right

bettysteger avatar Nov 28 '23 13:11 bettysteger

image image

i found out when Editorjs added codex-editor--narrow to the CSS class the plus icon is right .. although it has the same width - i think i am doing something wrong when initializing!

bettysteger avatar Nov 28 '23 14:11 bettysteger

As a quickfix I did this in the onReady callback:

onReady: () => {
  // plus and tunes buttons should be always on the left
  editor.ui.nodes.wrapper.classList.remove('codex-editor--narrow');
},

for us our editor is just visible on desktop, so that works!

bettysteger avatar Nov 28 '23 14:11 bettysteger