I have an ExtJS RichText (CQ5 Component that has been extended from the CQ.form.rte).
There are rtePlugins that are supported using the following, as anyone would:
credit = new CQ.form.RichText({
height : 100,
width : 400,
fieldLabel : 'Photo Credit',
rtePlugins : {
misctools: {
features: ['specialchars', 'sourceedit'],
specialCharsConfig: {
chars: CN.Author.Util.specialCharacters
}
}
}
});
When I click on Source Edit, I want to manipulate the DOM and add a class to the HTML. What I mean is, I want the RTE editor to automatically add an extra class to the Source – the value of the RTE field, before saving. Kindly help
Well you’ll have to probably override MiscToolsPlugins.js, EditorKernel.js, HtmlRules.js, and HtmlProcessor.js. Probably isn’t worth it all. You are probably better off putting your rule in the styles drop-down (see Styles plugin).