I am trying to get images inserted via the build in image plugin to use width and height attributes rather than styles. We use HTML purifier to keep content clean and it does not allow the style attributes (nor should it by HTML best practices) for these 2 attributes.
I found this thread but the suggestions did not seem to do anything. I have added this line to my config...
config.allowedContent = true;
Then this...
CKEDITOR.on('instanceReady', function(ev)
{
clog('this code actually ran');
ev.editor.filter.addTransformations([
[
'img: sizeToAttribute',
'img{width,height}: sizeToStyle',
'img[width,height]: sizeToAttribute'
]
]);
});
I have tried all mixes of those 3 options and it still keeps droppng in ....
style="width:200px"
rather than
width="200px"
It does not seem that the sizeToAttribute funciton ever seems to run or do anything. The HTML never seems to reflect this. I keep finding references to options for ACF, but no examples that work. Any advice on what to do to get this working?