[英]Add an extra class to the Source value of Rich Text Editor
我有一個ExtJS RichText(已從CQ.form.rte
擴展的CQ5組件)。
使用以下內容支持rtePlugins,就像任何人一樣:
credit = new CQ.form.RichText({
height : 100,
width : 400,
fieldLabel : 'Photo Credit',
rtePlugins : {
misctools: {
features: ['specialchars', 'sourceedit'],
specialCharsConfig: {
chars: CN.Author.Util.specialCharacters
}
}
}
});
當我單擊Source Edit時,我想操縱DOM並向HTML添加一個class
。 我的意思是,我希望RTE編輯器在保存之前自動向Source添加額外的類 - RTE字段的值。 請幫助
那么你必須覆蓋MiscToolsPlugins.js,EditorKernel.js,HtmlRules.js和HtmlProcessor.js。 可能不值得。 最好將規則放在樣式下拉列表中(參見樣式插件)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.