dimitrov-adrian / directus-extension-editorjs-interface

Block editor (Editor.js) interface for Directus 9
https://www.npmjs.com/package/directus-extension-editorjs
GNU General Public License v3.0
180 stars 42 forks source link

Some Tools are missing from editor #18

Closed madc closed 2 years ago

madc commented 2 years ago

I just installed this interface via yarn with latest into the current version of Directus and it seems some tools (i.e. embed) do not appear, even if activated in the interface settings.

image image

dimitrov-adrian commented 2 years ago

Embed tool is an inline plugin, it acts upon link paste (like twitter, yt or facebook), some of the tools are for inline elements (when mark a text for example).

Thinking, may be the title "Toolbar" is bit confusing in such case.

madc commented 2 years ago

Thanks for taking the time to answer, really appreciate this. Coming from Directus I'm looking into Editor.js for the first time. I read the plugins documentation before and guess I expected it to work similar to the image plugin.

I'm having a hard time to understand this part of the docs: https://github.com/editor-js/embed#inline-toolbar Do you think it would allow to add a button to the toolbox?

dimitrov-adrian commented 2 years ago

Not exactly, the inlineToolbar flags in the configuration enables the inline toolbar when marking a text, and in the case of embed tool, it applies to the input field after embeded content. The editorjs docs here are bit tricky to get in first glance.

So briefly, enableToolbar config here, allows when you paste for example youtube link, and after the content is embeded, it displays an input field, so in this field you could have Bold, Italic, Underline, ...etc

madc commented 2 years ago

OK, thanks for the clarification. Everything works as intended so I'll close this.