attoae / quill-table-better

A module that enhances the table functionality of Quill.
MIT License
59 stars 5 forks source link

How to disable editor buttons in the toolbar when the table cell is active? #33

Closed Alpscloud closed 4 days ago

Alpscloud commented 1 month ago

Hello! Can you help me with my problem: I see that when focusing on a table cell, some editor control buttons are blocked. How can I specify which buttons to block and which not? For example, I need to prohibit adding headings, images, etc. photo_2024-10-08_16-34-01

The part of my editor component code where I include this plugin: const postsDesignOptions = { theme: 'snow', modules: { htmlEditButton: {}, toolbar: { container: toolbarOptions.postsDesign, }, 'table-better': { menus: ['column', 'row', 'merge', 'table', 'cell', 'wrap', 'delete'], toolbarTable: true, }, keyboard: { bindings: QuillTableBetter.keyboardBindings, }, }, };

attoae commented 1 month ago

The current version does not support specifying to disable buttons. Do you want to specify disable buttons in future versions?

Alpscloud commented 1 month ago

Yes, it will be great.

attoae commented 1 month ago

Refer to toolbarbuttons and Formats supported by table.