jodit icon indicating copy to clipboard operation
jodit copied to clipboard

Config option to hide the image editor button

Open Sayan751 opened this issue 4 years ago • 3 comments

Jodit Version: 3.4.29

Is there a config option to hide the image edit button?

image

Browser: OS: Is React App:

Code

// A *self-contained* demonstration of the problem follows...

Expected behavior:

Actual behavior:

Sayan751 avatar Nov 23 '20 10:11 Sayan751

You should replace popup.img option https://xdsoft.net/jodit/doc/options/popup/

Jodit.make('#editor', {
  popup: {
     img: Jodit.atom(Jodit.defaultOptions.popup.img.filter(btn => btn.name !== 'pencil'))
  }
})

xdan avatar Dec 18 '20 21:12 xdan

Thanks for the workaround @xdan.

However, I must say that's an odd way of doing it. I think a cleaner API should be provided to initialize the plugins, instead of packing everything together and then excluding stuff. It is also making the package non-tree-shakable.

Sayan751 avatar Jan 07 '21 07:01 Sayan751

Is there any way to rewrite the behavior of Pencil button?e.g. i want to open a custom pannel by clicking the Pencil button. @xdan @Sayan751 could u please help me with it?

zhangchaoming005 avatar Aug 01 '23 06:08 zhangchaoming005