Multiple tinyMCE instances for fields with the same identifier

We have several copies of the same type (tasks for resumes, only hidden fields "job_id" are changed on each), and we want to use tinyMCE for the textarea description field.

In each form, the description field is called "inputDec". TinyMCE seems to fail after one use, despite the fact that each of the forms has unique names.

Multiple instances are not a problem, but are they possible when the identifier is the same - even if the forms are different - all on one page.

Thanks in advance for any suggestions regarding this issue?

+4
source share
3 answers

Each ID attribute must be unique in the HTML document. Have you tried attaching it to elements using some class name? http://www.tinymce.com/wiki.php/Configuration:editor_selector

+2
source

Basically the same as above, but I will clarify that it is more: P

Make sure that:

  • All forms have different identifiers.
  • All inputs have different identifiers.
+1
source

Hide the tinymce instance that it creates by default, i.e. with id mce_0_container in css. iee

mce_0_container {display: none;}

. I tried and it worked for me.

+1
source

Source: https://habr.com/ru/post/1393064/


All Articles