2017-10-18 173 views
1

我想将自定义配置文件添加到我的应用程序中的所有RichText项目,但我无法弄清楚如何在dojo属性中正确引用配置文件。我想把它引用到数据库。如何将CKEditor自定义配置文件添加到XPage?

<xp:dojoAttribute name="customConfig" value="cke_custom_config.js"></xp:dojoAttribute> 

enter image description here

<xp:inputRichText id="inputRichText2" value="#{cd.Body}"> 
    <xp:this.dojoAttributes> 
    <xp:dojoAttribute name="customConfig" value="cke_custom_config.js"></xp:dojoAttribute> 
    </xp:this.dojoAttributes> 
</xp:inputRichText> 

在我的例子中配置文件上面参考: http://server/xsp/.ibmxspres/domino/ckeditor/cke_custom_config.js?t=G44E

我怎样才能改变路径到配置文件指向“的WebContent/cke_custom_config。 js“?

回答

3
<xp:inputRichText id="inputRichTextBody" 
    value="#{cd.Body}"> 
    <xp:this.dojoAttributes> 
     <xp:dojoAttribute name="customConfig" 
      value="${facesContext.externalContext.request.contextPath}/cke_custom_config.js?open"> 
     </xp:dojoAttribute> 
    </xp:this.dojoAttributes> 
</xp:inputRichText> 

的EL部分cke_custom_config.js前加入?开是路径到当前数据库。

+0

谢谢。为什么我需要摆脱时间戳,是为了防止缓存? –

+0

我认为参数将工作,如果使用“cke_custom_config.js?打开” –

+0

@ThomasAdrian:好的,改变我的答案 –

相关问题