MyFaces 2.0.2 +小MCE
我最近尝试将 TinyMCE 集成到我的 Myfaces 应用程序中。我已下载 TynyMCE 并将其解压到我的 webapp 文件夹中。我编写了以下代码:
<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%" />
结果我看到带有仪器的面板,但没有图标。
任何想法如何修复它?
我只想补充一点,这段代码是 ui:composition 的一部分。
I was recently trying to integrate TinyMCE in my Myfaces application. I have downloaded and extracted TynyMCE in my webapp folder. I have written the following code:
<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%" />
As a result I see panel with instruments but there are no icons.
Any ideas how to fix it?
I just want to add that this code is part of ui:composition.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要将 插件参数 添加到您的配置中。
这可能看起来像这样(确保您在此处包含您需要的所有插件名称):
You need to add the plugin parameter to your config.
This might look something like (make sure you include all the pluginnames here that you need):
当您使用常规 html 标记加载tiny_mce.js 文件时会发生什么:
我通过替换新的 jsf2 标记解决了 jsf2 和tinymce 的问题
what happens when you load your tiny_mce.js file with a regular html tag:
I solved my problem with jsf2 and tinymce by replacing the new jsf2 tag