RTF編輯器(RTE)提供使用標籤輸入文本的功能。
對於Communities元件,與 製作環境中的RTF編輯器,則會影響在發佈環境中輸入的文字。
允許使用者產生內容(UGC)的社群元件可啟用以允許RTE。 視元件已新增至頁面或包含在 函式,RTE預設為啟用或不啟用。
如果未啟用,只需輸入 作者編輯模式,選取要編輯的元件,然後選取 Rich Text Editor
核取方塊。
RTE適用於下列Communities元件:
RTF編輯器可自訂,因為實作是根據 CKEditor.
Communities元件的目前設定位於 cq.social. scf clientlib
,位於
/libs/clientlibs/social/commons/scf/ckrte.js
不建議修改cq.social.scf clientlib,因為日後的升級可能會覆寫任何編輯。
基於安全性考慮,預設情況下,向成員呈現的富文本表徵圖集中不包含超連結選項。 在UGC中允許href時,其雜訊能力較強。
要將超連結選項添加到工具欄,請執行以下操作:
links
"
{ name: 'links', items: [ 'Link','Unlink','Anchor' ] }
CKRte.prototype.config = {
toolbar: [
{ name: "basicstyles",
items: ["Bold", "Italic", "Underline", "NumberedList", "BulletedList", "Outdent", "Indent", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock", "TextColor"]
},
{ name: 'links',
items: [ 'Link','Unlink','Anchor' ]
}
],
autoParagraph: false,
autoUpdateElement: false,
removePlugins: "elementspath",
resize_enabled: false
};