简体   繁体   English

TinyMCE textarea问题

[英]TinyMCE textarea problem

I have an automatically generated text-area (by the Erlang Web framework) that looks like the following: 我有一个自动生成的文本区域(通过Erlang Web框架),如下所示:

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

I'm trying to apply the TinyMCE editor to it, but what happens is the following: 我正在尝试将TinyMCE编辑器应用于它,但是发生了以下情况:

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

So, my textarea is not replaced, but it's "embedded" in the RTE. 因此,我的textarea不会被替换,而是被“嵌入”在RTE中。 I'm initializing TinyMCE as follows: 我正在初始化TinyMCE,如下所示:

<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. 请尝试以下操作,因为我记得我做了类似的事情,并且您必须指定textarea的ID。

<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 1)doctype和html / css规则的呈现2)您的css规则可能会冲突3)您的html结构损坏,DOM 4)小型mc javascript可能存在dom结构问题,而这又可能是由doctype,html结构引起的

is this issues page specific? 这个问题页面具体吗? or it happens on every page? 还是发生在每一页上?

are your form elements inserted and created by js? 是由js插入和创建的表单元素?

I tried to put a different #id from name attribute and it works 我试图从name属性中放置一个不同的#id,并且可以正常工作

<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'});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM