What is the difference between tinymce jQuery version and tinymce jQuery plugin? Are there any functionality differences? What are some criteria for deciding which one to use?
You don't need to use tinymce as a jQuery plugin but the option is there if you would like to. The vast majority of the tinymce source code is in the tinymce. min. js file and the jQuery.
The TinyMCE for jQuery plugin also adds a tinymce pseudo selector. This can be used to get all the instances of a page or check if an element has an editor instance or not. Below is an example on how to use the pseudo selector. // Getting all converted textareas and set contents to the $('textarea:tinymce').
You can use the activeEditor for that, or if (for some reason) you have the original element that created the editor in a jQuery object, you can use that jQuery object to get the id of the original element and use that in order to get the content of the TinyMCE (using the TinyMCE editor).
One big difference is performance!
I found out that the internal handling of keystrokes (checks and functions) of the jquery tinymce build is 4 times slower than the handling in the regular tinymce build (tiny_mce.js
). This had a big impact on a project i had been working on where performance was a crucial aspect and lots of addional checks and functions had to be added in order to press tinymce to the users desires. Now i use jQuery as library + the regular tinymce build -> works great.
As far as I know the tinymce jQuery version is just a bit smaller than the "normal" version, because they use the libraries which are redundant with jquery directly from jquery.
So there shouldn't be any differences between the jquery version and the "normal" version.
The jquery plugin on the other hand lets you do things like this:
$('textarea.tinymce').tinymce();
So if you intend to use the jquery plugin you are most propably save to use the tinymce jquery version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With