editor.js
editor.js copied to clipboard
Documentation vague on position of buttons
I can't find information on how to force the position of the buttons next to the blocks.
Example:
Is it possible have then in a specific position (right / left)?
@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
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!
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!