2017-10-18 175 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:好的,改變我的答案 –

相關問題