In case when you want to edit existing plantuml you have an empty src-attribute. I fixed this problem in CKEDITOR.on('instanceReady') function. Here is my code:
htmlFilter.addRules( {
elements : {
$ : function( element ) {
if ( element.name == 'img' ) {
// var imgsrc = element.attributes.src;
// element.attributes.src = imgsrc;
var imgalt = element.attributes.alt;
var u = compress(imgalt);
element.attributes.src = u;
element.attributes['data-cke-saved-src'] = u;
}
}
}
});