Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tinymce jquery version vs jquery plugin

Tags:

jquery

tinymce

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?

like image 414
fortuneRice Avatar asked Jun 16 '11 17:06

fortuneRice


People also ask

Does TinyMCE need jQuery?

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.

What is TinyMCE 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').

How do I get the content of TinyMCE editor in jQuery?

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).


2 Answers

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.

like image 55
Thariama Avatar answered Oct 20 '22 14:10

Thariama


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.

like image 45
kufi Avatar answered Oct 20 '22 14:10

kufi