tinymce / tinymce-react

Offical TinyMCE React component
MIT License
938 stars 151 forks source link

I see the message "tinymce should have been loaded into global scope" in our project #408

Closed zhang447671008 closed 1 year ago

zhang447671008 commented 1 year ago

we use "@tinymce/tinymce-react": "^4.2.0" in our react project and use npm to download the dependence, Unfortunately in our production env. the error message "tinymce should have been loaded into global scope" is appeared.. and tinymce can not initialization... The strange thing is that we can use it in our develop env..

As for why we want to upgrade this plugin is that in "@tinymce/tinymce-react": "^3.12.6" version .. we want to render an html page with a piece of code. but a part of code not display and have been replace with &nbsp ... in version 4.2.0 fixed it in local env..

exalate-issue-sync[bot] commented 1 year ago

Ref: INT-3057

yacodes commented 1 year ago

@zhang447671008 Unfortunately there is not enough info for us to start addressing this issue. Please, provide a minimal example of the problem on codepen or similar service.

tiny-james commented 1 year ago

Here is an example of a simple way to setup tinymce-react to load the same TinyMCE as in the node_modules https://www.tiny.cloud/docs/tinymce/6/react-pm-host/ It implements this by copying the node_modules/tinymce folder into the public folder where the tinymce-react integration can use it.

If you need more help then please provide an example of what you have tried. I recommend using this codesandbox template as a starting point when creating the example: https://codesandbox.io/s/tinymce-tinymce-react-p6bqty