DEV Community

Rex
Rex

Posted on

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