DEV Community

Rex
Rex

Posted on

4 2

Fix TinyMCE-React not usable in Material-UI Dialog

The TinyMCE editor rendered in Material-Ui Dialog doesn't work as expected. For example, TinyMCE Dialog component fields are not selectable; the table and link plugin doesn't work etc.

All of these just because TinyMCE is having problems to focus things.

The fix is very simple: disable Material UI Dialog's enforce focus by adding a prop disableEnforceFocus={true} and optionally disableAutoFocus={ true}

Top comments (4)

Collapse
 
jindo profile image
Duong Chien

thanks very much ^^

Collapse
 
ruslan43g profile image
Ruslan Tikhomirov

Thank you very much! You saved me)

Collapse
 
tshedup profile image
Tshedup Gyeltshen

I am using Material Tailwind Dialog. the dropdown from the tool are appearing behind the dialog modal. I tried with z-index but could not resolve it. If you could help me out. Thanks

Collapse
 
quangtaph12673 profile image
Trần Quang • Edited

Thanks for answer

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay