我正在尝试让CKEditor在Share(http://code.google.com/p/share-extras/wiki/CKEditorFormControl)下运行,在之前的版本(4.0.d)中它运行正常,但在最新版本中我遇到了问题。 在访问编辑表单时,它不会在内容的位置显示任何内容,在日志中我有以下内容:
9.7.2012 14:56:59 org.apache.jsp.error500_jsp _jspService
SEVERE: javax.servlet.ServletException: Could not resolve view with name 'site/my_sample_site/skins/kama/editor.css' in servlet with name 'Spring Surf Dispatcher Servlet'
9.7.2012 14:56:59 org.apache.jsp.error500_jsp _jspService
SEVERE: javax.servlet.ServletException: Could not resolve view with name 'site/my_sample_site/contents.css' in servlet with name 'Spring Surf Dispatcher Servlet'
在该页面的源代码中,div是正确定义的编辑器,也是js包含的。我尝试在我的share-config-custom.xml中手动定义资源的依赖项,看起来它有一些效果,因为表单div的高度发生了变化,但它仍然是空的,并记录了相同的异常。
<config>
<forms>
<dependencies>
<js src="/modules/editors/ckeditor/ckeditor.js" />
<js src="/components/editors/ckeditor/ckeditorloader.js" />
<js src="/modules/editors/ckeditor/lang/cs.js" />
. . .
<js src="/modules/editors/ckeditor/skins/kama/editor.css" />
<js src="/modules/editors/ckeditor/contents.css" />
</dependencies>
</forms>
</config>
我添加了所有丢失的东西,这些东西在运行时出现,但没有任何效果。
我的问题是:为什么'某事'仍然试图在编辑器内的相对路径中访问资源?我手动定义了资源,为什么不接受它们呢?
答案 0 :(得分:0)
我确实提出了一些更改,使其适用于4.2.c,图像属性和属性版!
https://github.com/fliot/ckeditor-forms
希望他们很快就会进入主分公司。</ p>
关心弗朗索瓦
答案 1 :(得分:0)
在Alfresco 4.2.2中,我通过在form.js.ftl和form.css.ftl文件中添加依赖项来实现它。
<@script type="text/javascript" src="${url.context}/res/components/editors/ckeditor/ckeditorloader.js" group="form"/>
<@script type="text/javascript" src="${url.context}/res/components/editors/ckeditor/config.js" group="form"/>
<@script type="text/javascript" src="${url.context}/res/modules/editors/ckeditor/ckeditor.js" group="form"/>
<@script type="text/javascript" src="${url.context}/res/modules/editors/ckeditor/config.js" group="form"/>
<@script type="text/javascript" src="${url.context}/res/modules/editors/ckeditor/lang/en.js" group="form"/>
<@script type="text/javascript" src="${url.context}/res/modules/editors/ckeditor/plugins/image/dialogs/image.js" group="form"/>
<@script type="text/javascript" src="${url.context}/res/modules/editors/ckeditor/plugins/styles/styles/default.js" group="form"/>
<@link href="${url.context}/res/modules/editors/ckeditor/skins/kama/editor.css" group="form"/>
<@link href="${url.context}/res/modules/editors/ckeditor/skins/kama/dialog.css" group="form"/>
<@link href="${url.context}/res/modules/editors/ckeditor/contents.css" group="form"/>