tinyMCE不添加对特定纹理的控制

2024-05-28 18:39:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试添加一个textarea并使用

tinyMCE.execCommand('mceAddControl', false,'id')

我尝试过其他文本区域,效果很好,但不适用于这个特定的文本区域:

^{pr2}$

是不是名字太大了?或者因为某些字符在tinyMCE中无效?在

这是我的tinyMCE初始配置:

tinyMCE.init({
            mode : "textareas",
            theme : "advanced",
            plugins : "emotions,spellchecker,advhr,insertdatetime,preview,jbimages", 

            // Theme options - button# indicated the row# only
            theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
            theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,jbimages,|,code,preview,|,forecolor,backcolor",
            theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions",      
            theme_advanced_toolbar_location : "top",
            theme_advanced_toolbar_align : "left",
            theme_advanced_resizing : false ,
            relative_urls : false
    });

这是我想要激活的元素:

<textarea id="id_sguidepoint_set-3-gp_description" rows="10" cols="40" name="sguidepoint_set-3-gp_description" style="display: none; " aria-hidden="true"></textarea>

显然有不止一个textarea,这就是为什么我必须使用索引来遍历它们

如有任何帮助,我们将不胜感激

提前谢谢


Tags: 文本idfalse区域previewthemeadvancedtinymce
1条回答
网友
1楼 · 发布于 2024-05-28 18:39:45

好吧,在尝试了很多不同的方法之后,我发现我的问题是文本区域被隐藏了:

style= "display: none"

所以这就是问题所在,因为文本区域可以绘制,所以一切都没问题。在

我希望它能对其他有同样问题的人有所帮助。在

问候

相关问题 更多 >

    热门问题