Like the topic: How do I add default classname to images uploaded with CKAditator?
CKEDITOR.on ('instanceReady' , Function (ev) {var editor = ev.editor; var dataprocessor = editor.dataProcessor, htmlFilter = dataprocessor & amp; amp; datapersonasource html filter; htmlFilter.addRules ({element: {$: function (element) {if (element .name == 'IMG') {if (Element.attributes ['class']) {element.attributes ['class'] = "helloworld";}} return element;}}});});
Comments
Post a Comment