如何以相同的形式启用多个 TinyMCE [英] How to enable multiple TinyMCE in the same form
本文介绍了如何以相同的形式启用多个 TinyMCE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想以相同的形式在 tinyMCE 中使用 2 个不同的文本区域.第一个效果很好,但是每当我添加第二个时,第二个都会被禁用(当我从右下角手动放大时它会启用).它们的字段名称和 id 不同.
I want to use 2 different textareas with tinyMCE in the same form. The first one works well but whenever I am adding the 2nd one, the 2nd one disabled (it enables when I enlarge it manually from bottom right corner). Their field name and id is different.
谁能告诉我如何解决这个问题?
Can anyone tell me how can I fix this problem?
提前致谢.
推荐答案
由于没有您提供的代码,我们无法确定您的问题出在哪里.也许绕道而行,在一个类上为两个 Textareas 初始化 TinyMce:
Since there is no code from you we cant figure out where your problem is. Maybe to go a way around, init TinyMce for both Textareas over a class:
<script type="text/javascript" src="<your installation path>/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "simple",
editor_selector : "mceSimple"
});
tinyMCE.init({
mode : "textareas",
theme : "advanced",
editor_selector : "mceAdvanced"
});
</script>
<form method="post" action="somepage">
<textarea name="content1" class="mceSimple" style="width:100%">
</textarea>
<textarea name="content2" class="mceAdvanced" style="width:100%">
</textarea>
</form>
干杯,斯蒂芬
这篇关于如何以相同的形式启用多个 TinyMCE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文