TinyMCE Text Area Issues

I have an automatically generated text area (using the Erlang Web infrastructure) that looks like this:

<span class="form_input">
  <textarea id="question_text" class="tinymce" name="question_text"> </textarea>
</span>

I am trying to apply the TinyMCE editor to it, but the following happens:

http://img24.imageshack.us/img24/9250/tinyt.jpg

So, my text box is not replaced, but it is "embedded" in RTE. I initialize TinyMCE as follows:

<script type="text/javascript">
  tinyMCE.init({
    mode : "specific_textareas",
    editor_selector : "tinymce"
  });
</script>

Any clues?

+3
source share
3 answers

try the following because i remember i did something similar and you need to specify the id of the text field.

<script type="text/javascript">
   tinyMCE.init({
    mode : "exact",
    elements : "question_text"
  });
</script>
+2
source

, .

1) doctype html/css 2) css 3) html , DOM 4) mc javascript dom , , , doctype, html structure

? ?

- js?

0

I tried putting another #id attribute from the name and it works

<textarea id="question_text" class="tinymce" name="question_text"> </textarea>

to

<textarea id="question_text_textarea" class="tinymce" name="question_text"> </textarea>

and then later ...

tinymce.init({selector:'textarea'});
0
source

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


All Articles