This issue has been solved in dev (7.x-2.3 when published) as part of CKeditor 4.1 ACF.
You may try either to upgrade your WYSIWYG or try the below workarounds.
In Drupal 7 you can try the following hook:
<?php
/**
* Implements hook_wysiwyg_editor_settings_alter().
*/
function MYMODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
if ($context['profile']->editor == 'ckeditor') {
$settings['allowedContent'] = TRUE;
}
}
?>
or by using some other idea:
<?php
/**
* Implements hook_wysiwyg_editor_settings_alter().
*/
function MYMODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
if ($context['profile']->editor == 'ckeditor') {
$settings['extraAllowedContent'] = array(
'img[src,title,alt,style,width,height,class,hspace,vspace,view_mode,format,fid]',
);
}
}
?>
or with the following jQuery code:
CKEDITOR.replace( textarea_id, {
allowedContent: true
} );
Related: