You are here

function picture_wysiwyg_editor_settings_alter in Picture 7

Same name and namespace in other branches
  1. 7.2 picture.module \picture_wysiwyg_editor_settings_alter()

Implements hook_wysiwyg_editor_settings_alter().

File

./picture.module, line 1479
Picture formatter.

Code

function picture_wysiwyg_editor_settings_alter(&$settings, $context) {
  if ($context['profile']->editor == 'ckeditor') {
    if (!isset($settings['extraAllowedContent'])) {
      $settings['extraAllowedContent'] = array(
        'img[src,title,alt,style,width,height,class,hspace,vspace,view_mode,format,fid,data-picture-group,data-picture-align]',
      );
    }
    else {

      // @todo: try finding the img entry and add data- attributes if needed.
    }
  }
}