Developer forum
E-mail notifications
RE: How to control CK Editor parsing
Replies
You have to use the allowedContent settings to allow these elements with classes (or attributes in general), i.e. your editor configuration file should contain something along the lines of
CKEDITOR.editorConfig = function(config) { … config.allowedContent = 'form ul[*]; label i button'; … };
Check out Allowed Content Rules in the CKEditor 4 documentation for more details and examples on using allowedContent.
Best regards,
Mikkel
Hi Mikkel,
Thanks for getting back to me.
config.allowedContent =
'form ul(*); label i button'
;
enables Custom Mode in CKEditor, which disables everything.
config.extraAllowedContent =
'form ul(*); label i button'
;
works great. extraAllowedContent expands what is already allowed in Automatic Mode. Unfortunately the <i> tag is still not being allowed.
I also tried disabling the filtering completely with
config.allowedContent=true;
but the <i> tag was still blocked. Is there something else that might be blocking the <i> tag?
Conor
What is Advanced Content Filter (ACF)?
I found something that allows an <i> tag. This is it:
config.protectedSource.push(/<i[^>]*><\/i>/g);
Thanks for your help Mikkel,
Conor
You must be logged in to post in the forum