Reputation: 281
My task is, whatever images added in the ckeditor through image dialog it should be responsive.
To achieve this:
It's working fine.
Now the issue is, if we right-click the added image in ckeditor then context-menu will open with the following options 'cut, copy, paste and image properties'. In this, if we choose 'image property' then the image dialog will open and in dialog advanced tab, srcset option set to empty but I gave the srcset value while adding a image.
How to fix this issue?
Upvotes: 0
Views: 147
Reputation: 281
Solution:
dialogDefinition.dialog.on('show', function (event) {
if (event.sender.getSelectedElement()) {
var srcset = event.sender.getSelectedElement().getAttribute('srcset');
dialogDefinition.dialog.setValueOf('advanced', 'txtdlgGenSrcSet', srcset);
}
});
'txtdlgGenSrcSet' is new option.
Upvotes: 2