首页 文章

禁用primefaces-extension ckeditor

提问于
浏览
2

我使用Primefaces扩展3.0.0与Primefaces 5.2没有问题 . 但我现在尝试升级到Primefaces扩展3.2.0,我有一个ckeditor的问题 .

我解释 :

我不想使用嵌入的Primefaces扩展CkEditor,而是使用我的webapp / resources目录中的自定义扩展 . 3.0.0一切都还可以 . 但是对于3.2.0版本,所有需要资源的GET,如插件,都被primefaces扩展拦截,我的自定义ckeditor无法启动 . 我不想安装primefaces-extension ckeditor . 只需使用我自己的 .

我有这个错误:GET http://localhost:8080/chainedit3/javax.faces.resource/ckeditor/config.js.xhtml?ln=primefaces-extensions&v=3.2.0 404(Introuvable)Uncaught TypeError:无法设置属性'dir'未定义

好的GET应该是:GET http://localhost:8080/chainedit3/resources/ckeditor/config.js

如何在primefaces-extension或ckeditor中禁用这些不良资源GET?

谢谢 .

<p:panel rendered="#{inputItem.type == 'typeeditor'}" width="75%">  
             <script type="text/javascript" >
                    var CKEDITOR_BASEPATH  = '../../resources/ckeditor/';
             </script>
             <script src="../../resources/ckeditor/ckeditor.js" type="text/javascript"/>
             <script type="text/javascript" >
                    CKEDITOR.plugins.basePath = '../../resources/ckeditor/plugins/';
             </script>
             <textarea cols="90" rows="20"  id="editor0" name="0editor">#{inputItem.inputItemEditor.value}</textarea>
             <script type="text/javascript" >
                    CKEDITOR.replace( 'editor0',
                    {
                        uiColor: '#85B5D9',
                        width: '100%',
                        height: '300px',
                        readOnly : #{!associateBean.editMode},
                        chaineditCKEditorURL : "../../resources/ckeditor",
                        mathJaxLib : 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML',
                        <ui:repeat value="#{inputItem.inputItemEditor.parameters}" var="eAttribute" varStatus="statusAttribute">
                            #{eAttribute.value} : #{eAttribute.label},
                        </ui:repeat>
                        allowedContent : true

                    });
            </script>
        </p:panel>

1 回答

  • 0

    我是通过以下方式做到的:

    CKEDITOR_GETURL = function (r) {
       return r.startsWith('http:') ? r : "http//cdn.ckeditor.com/4.5.6/full-all/" + r;
    };
    

相关问题