MyFaces 2.0.2 +小MCE

发布于 2024-12-07 03:18:15 字数 1454 浏览 1 评论 0原文

我最近尝试将 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.The result

Any ideas how to fix it?

I just want to add that this code is part of ui:composition.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

紫﹏色ふ单纯 2024-12-14 03:18:15

您需要将 插件参数 添加到您的配置中。

这可能看起来像这样(确保您在此处包含您需要的所有插件名称):

plugins: "preview,save,searchreplace,inlinepopups,paste,wordcount,contextmenu",

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):

plugins: "preview,save,searchreplace,inlinepopups,paste,wordcount,contextmenu",
太阳公公是暖光 2024-12-14 03:18:15

当您使用常规 html 标记加载tiny_mce.js 文件时会发生什么:

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

我通过替换新的 jsf2 标记解决了 jsf2 和tinymce 的问题

what happens when you load your tiny_mce.js file with a regular html tag:

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

I solved my problem with jsf2 and tinymce by replacing the new jsf2 tag

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文