开发者

TinyMCE textarea problem

I have an automatically generated text-area (by the Erlang Web framework) that looks like the following:

<span class="form_input">
  <textarea id="question_text" class="tinymce" name="question_text"> </tex开发者_如何学编程tarea>
</span>

I'm trying to apply the TinyMCE editor to it, but what happens is the following:

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

So, my textarea is not replaced, but it's "embedded" in the RTE. I'm initializing TinyMCE as follows:

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

Any hint?


try the following, cause I remember I did something similar and you have to specify the id of the textarea.

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


from screen shot it looks like one or many of the following might be an issue.

1) doctype and rendering of your html/css rules 2) your css rules might conflict 3) your html structure broken, DOM 4) tiny mc javascript may be having issues with dom structure, which in turn can be caused by doctype, html structure

is this issues page specific? or it happens on every page?

are your form elements inserted and created by js?


I tried to put a different #id from name attribute 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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜