Welcome to the React feedback portal. We’re happy you’re here! If you have feedback on how to improve the React, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

In the documentation example of a custom tool in the rich text editor the custom tool button doesn't get disabled when toggling into Source Code mode. See attached image.

customtoolnotdisabled.png

However on the SyncFusion demos site the demo of the same functionality has different code where it is disabled:

https://ej2.syncfusion.com/react/demos/#/material/rich-text-editor/insert-special-characters

... that demo appears to use actionCompleteHandler to add/remove "e-overlay" from the custom tool.

However when looking into the issue prior to finding that demo I found that you don't need to use actionCompleteHandler - if you set the property "command" to the string "Custom" on the custom tool then it will get handled automatically.

I found this when looking at getTBarItemsIndex which will not include in its results any tool of type object unless it has "command" set to "Custom" - see line 280 


By way of demonstrating this I forked the demo, removed actionCompleteHandler and added command: "Custom" to the tool and lo and behold if you toggle to SourceCode mode the custom tool button is disabled automatically:

Whether it's an oversight that neither the demo nor the example set command to Custom I don't know and I don't know why getTBarItemsIndex will ignore tools specified by objects unless they have command set to Custom as it's not documented that I could see!