tinymce / tinymce-react

Offical TinyMCE React component
MIT License
937 stars 152 forks source link

Dark mode to light mode not working #464

Closed isaacdarcilla closed 11 months ago

isaacdarcilla commented 11 months ago

What is the current behavior?

Trying to switch from dark mode to light mode, docs here https://www.tiny.cloud/blog/dark-mode-tinymce-rich-text-editor/

image

It seems it cannot find the right styles when switching to light mode., thus it does not render the editor.

**Please provide the steps to reproduce and if possible a minimal demo of the problem via [codesandbox.io]

init={{
          skin: (localStorage.theme === 'dark' ? 'oxide-dark' : ''),
          content_css: (localStorage.theme === 'dark' ? 'dark' : ''),
          ...
}}

What is the expected behavior?

Light mode editor should be rendered.

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-react?

Latest

TinyITAdmin commented 11 months ago

Ref: INT-3214

isaacdarcilla commented 11 months ago
skin: (localStorage.theme === 'dark' ? 'oxide-dark' : 'snow'),
content_css: (localStorage.theme === 'dark' ? 'dark' : 'default'),

Ahh my mistake. Fixed!