2012-07-09 32 views
0

我试图让CKEditor在Share(http://code.google.com/p/share-extras/wiki/CKEditorFormControl)下运行,在以前的版本(4.0.d)中它正常工作,但是在最新的版本中我遇到了问题。 当访问编辑的形式,它不会显示在地方的任何内容,在日志中我有以下几点:Alfresco下的CKEditor分享(4.2.a)

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

我提出了一些改变,使其适用于4.2.c,图像属性和属性版!

https://github.com/fliot/ckeditor-forms

希望他们能在主分支很快被拉出。

问候弗朗索瓦

+0

对不起,该项目已过时,所以我无法再尝试您的答案:) – shmoula 2013-03-26 15:34:37

0

在露天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"/>