相关疑难解决方法(0)

带有div标签的TinyMCE?

下面是我的JSP代码:

<tr>
      <td colspan="2">custEmail</td>
      <td colspan="5"><div id= "custEmail"><p><strong>Test</strong></p></div></td>
</tr>
Run Code Online (Sandbox Code Playgroud)

下面是附接的代码divTinyMCE的编辑器

<script type="text/javascript" src="tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinyMCE.init({
        width : "640",
        mode : "exact",
        elements : "custEmail",
        theme : "advanced",
        plugins : "preview",
        readonly : true,
        theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,formatselect,fontselect,fontsizeselect,sub,sup,|,bold,italic,underline,strikethrough",
        theme_advanced_buttons2 : "",
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true
    });
</script>
Run Code Online (Sandbox Code Playgroud)

但在我的HTML页面上,我将内容视为:

<p><strong>Test</strong></p>
Run Code Online (Sandbox Code Playgroud)

而不是大胆的测试.一旦我更改以下内容:

div id="custEmail" tag to textarea id="custEmail"
Run Code Online (Sandbox Code Playgroud)

它工作正常.不确定我是否需要为div标签设置一些设置?

html javascript jsp tinymce

5
推荐指数
1
解决办法
7771
查看次数

标签 统计

html ×1

javascript ×1

jsp ×1

tinymce ×1