Jsf MyFaces 2.0.2+;蒂尼姆斯

Jsf MyFaces 2.0.2+;蒂尼姆斯,jsf,tinymce,wysiwyg,myfaces,Jsf,Tinymce,Wysiwyg,Myfaces,我最近试图在Myfaces应用程序中集成TinyMCE。我已经在我的webapp文件夹中下载并解压缩了TynyMCE。我编写了以下代码: <h:outputScript library="tiny_mce" name="tiny_mce.js" target="head" /> <h:outputScript target="head"> tinyMCE.init({ mode : "textareas",

我最近试图在Myfaces应用程序中集成TinyMCE。我已经在我的webapp文件夹中下载并解压缩了TynyMCE。我编写了以下代码:

<h:outputScript library="tiny_mce" name="tiny_mce.js" target="head" />
<h:outputScript target="head">
                tinyMCE.init({
                mode : "textareas",
                theme : "advanced",
                theme_advanced_buttons1 : "fullscreen,undo,redo,cleanup,|,formatselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,outdent,indent,|,link,unlink,|,forecolor",
                theme_advanced_buttons2 : "",
                theme_advanced_buttons3 : "",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "none",
                extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
                width : "100%",
                height : "260"
                 });
</h:outputScript>
<h:inputTextarea id="myTextArea" value="#{aboutBean.aboutInfo}"
                        rows="10" cols="50" style="width: 95%" />

tinyMCE.init({
模式:“文本区域”,
主题:“高级”,
主题_高级_按钮1:“全屏、撤消、重做、清理、|、格式选择、粗体、斜体、下划线、|、左对齐、居中对齐、右对齐、左对齐、右对齐、右对齐、右对齐、左对齐、缩进、缩进、|、链接、取消链接、|、前景色”,
主题\高级\按钮2:“”,
主题\高级\按钮3:“”,
主题\高级\工具栏\位置:“顶部”,
主题\高级\工具栏\对齐:“左”,
主题\高级\状态栏\位置:“无”,
扩展的有效元素:“a[name | href | target | title | onclick]、img[class | src | border=0 | alt | title | hspace | vspace | width | height | align | onmouseover | onmouseout | name]、hr[class | width | size | noshade]、font[face | size | size | size | color | style]、span |,
宽度:“100%”,
身高:“260”
});
因此,我看到面板上有仪器,但没有图标

有没有办法解决这个问题

我只想补充一点,这段代码是ui:composition的一部分。

您需要将添加到配置中

这可能看起来像(确保您在此处包含您需要的所有pluginnames):


加载带有常规html标记的tiny_mce.js文件时会发生什么情况:

<script type="text/javascript" src="#{request.contextPath}/resources/tiny_mce/tiny_mce.js"></script>


我用jsf2解决了我的问题,而tinymce通过替换新的jsf2tagwell也帮不了我。我有一种感觉,这是一个css问题?请尝试以下操作并告诉我发生了什么:从theme_advanced_buttons1中删除除“undo”之外的所有内容并设置“plugins:“undo””,only.wierd,如果使用theme“simple”,会发生什么?我尝试将微小的mce文件夹放在webapp根目录中以及资源文件夹中。仍然没有结果。你的页面可以通过互联网访问吗?你可以随时将Primefaces与你的项目集成在一起,并使用这个编辑器
<script type="text/javascript" src="#{request.contextPath}/resources/tiny_mce/tiny_mce.js"></script>