p:editor visible in chrome but not rendered properly in IE

耗尽温柔 提交于 2019-12-12 00:06:38

问题


The editor doesn't appears in my IE window while it works correctly in chrome

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">

Kindly guide me with what corrections needs to be done to make it visible in IE 8

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>

回答1:


For all i know, the IE 8 doesn't support Primefaces Editor, still in IE 11. Actually i can render it, but nothing works, not even the bold/italic/underline.

I think it's because the way IE process javascript... but i don't know much about technical issues.

(My tests were done on IE 11 and Primefaces 4.0, plain programming, didn't twitch anything)

Only for the RichText i'm using the HTML5 library wysihtml5 (GIT)

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



来源:https://stackoverflow.com/questions/16293706/peditor-visible-in-chrome-but-not-rendered-properly-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!