instructure-react / react-tinymce

React TinyMCE component
181 stars 115 forks source link

Uncaught ReferenceError: tinymce is not defined #9

Closed myndzi closed 8 years ago

myndzi commented 8 years ago

The component references tinymce twice, but never requires it in or creates it. I guess it just assumes that there is a global object named tinymce that exists?

This doesn't play nice if you're using browserify to handle your dependency inclusion. tinymce appears to exist on npm and there seems to be no reason not to include it: since TinyMCE.js does use require, it's not browser-safe on its own anyway.

hthi commented 8 years ago

Seeing same issue. Fix would be awesome! +1

barbalex commented 8 years ago

yep, same issue here

mzabriskie commented 8 years ago

The tinymce package on npm isn't compatible with Common JS, so it cannot be used in this module. This leaves us with the need for tinymce to already be globally available in your app. Not saying that this is ideal, just how it is.

barbalex commented 8 years ago

thanks

I tried MANY ways of shimming the package when loading it locally. Spent many hours trying. None worked. Only way I finally got it to work is with the cdn.

I'm using webpack and react.

Nonetheless: Thanks for this great tool!

rsvts commented 8 years ago

Извиняюсь за не английский но я решил эту проблему когда сменил права папки tinymce на 755

ucozlab commented 5 years ago

solved by adding tinymce.min.js script to the index.html file

bagmorgirish commented 4 years ago

you can add script like this because this option better then globally load

<TinyMCE scriptUrl={'//tinymce.cachefly.net/4.2/tinymce.min.js'} />