p:编辑器在chrome中可见,但在IE中无法正确呈现 [英] p:editor visible in chrome but not rendered properly in IE
问题描述
编辑器未在IE窗口中显示,但可以在chrome中正常工作
The editor doesn't appears in my IE window while it works correctly in chrome
我实现了p:layout,并且在中央layoutunit中包括了模板.xhtml使用ui:include封装在
I have implemented p:layout and in the center layoutunit I am including the template.xhtml using ui:include which is enclosed in a
<h:form id="centercontentpanel">
请指导我进行哪些更改才能使其在IE 8中可见
Kindly guide me with what corrections needs to be done to make it visible in IE 8
Template.xhtml
Template.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<h:body>
<f:view>
<p:editor id="editor" value="#{editorBean.value}"/>
<h:panelGrid columns="2" style="margin-top:10px">
<p:commandButton id="submitButton" value="Submit" update="display" oncomplete="editordlg.show()"
icon="ui-icon-disk" />
<p:commandButton id="clearButton" type="button" value="Clear" onclick="editor.clear()"
icon="ui-icon-close"/>
</h:panelGrid>
<p:dialog header="Content" widgetVar="editordlg" showEffect="fade" hideEffect="fade" modal="true">
<h:outputText id="display" value="#{editorBean.value}" escape="false" />
</p:dialog>
</f:view>
</h:body>
</html>
推荐答案
就我所知,IE 8不支持Primefaces Editor,仍在IE 11中。
实际上我可以渲染它,但没有任何效果,甚至不包括粗体/斜体/下划线。
我认为这是因为IE处理javascript的方式...但是我对技术问题了解不多。
< del>(我的测试是在IE 11和Primefaces 4.0上进行的,纯编程,没有抽搐任何东西)
仅适用于RichText i正在使用HTML5库 wysihtml5 (GIT)
Only for the RichText i'm using the HTML5 library wysihtml5 (GIT)
编辑:
对不起,我偶然发现了我的问题(在IE上编辑),希望它可以解决您的问题
只需添加 contentType = text / html
到< f:view>
像这样< f:view contentType = text / html>
他re 是擎天柱的帖子(即使是chrome的渲染问题)
I'm sorry, i just stumbled on the answear to my problem (Editing on IE), hope it fixes yours
Just add contentType="text/html"
to the <f:view>
like this <f:view contentType="text/html">
Here is the post from Optimus (Even though it's a rendering problem for chrome)
这篇关于p:编辑器在chrome中可见,但在IE中无法正确呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!