Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added in TinyMCE support. Tested with the tinymce-rails gem.
The set up is very simliar to how code-mirror works.
The only major difference is the defaults have to be set like bellow.
Also because the jquery version is loaded, two different scripts must be loaded, with the second as a call back, and then the load events as yet another call back for the second script load.
The options are as follows
The theme option is really just the default theme option, and once again because the jquery version is being used two scripts must be loaded, so there are two options for script location.
From what I have been able to test everything seems to work fine, but about every 10th load or so TinyMCE will just refuse to load. I tried forcing a wait to make sure it wasn't an issue with TinyMCE getting called before all the corresponding files where loaded, even with the nested callbacks. But I wasn't able to find the root cause of the issue.
I hope this helps, and let me know if anything is explained poorly or you have any questions.
PS: I also changed the array variable name for each of the editor setups in the coffee script, just to make things clearer.