summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorron_s2018-01-26 19:21:06 (GMT)
committerjoseph.olstad2018-01-26 19:21:06 (GMT)
commit12602390f58ac642dbe5bb0d4db20e54a0384919 (patch)
treee482cc638f98e8e06338da67eff71a26eb6d62f8
parentb1e1b296c3bebc84278725eeb338d9088619eca4 (diff)
Issue #2496461 by joseph.olstad, ron_s, kalabro: CKEditor Strips out Picture Tags When Inserting Images of Picture Type
-rw-r--r--modules/media_wysiwyg/media_wysiwyg.module9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/media_wysiwyg/media_wysiwyg.module b/modules/media_wysiwyg/media_wysiwyg.module
index 0a8482e..4777736 100644
--- a/modules/media_wysiwyg/media_wysiwyg.module
+++ b/modules/media_wysiwyg/media_wysiwyg.module
@@ -597,6 +597,15 @@ function media_wysiwyg_file_displays_alter(&$displays, $file, $view_mode) {
}
}
}
+ // For integration/support of the picture module https://www.drupal.org/project/picture.
+ // Disable Picture display in WYSIWYG mode. Normal <img> will be rendered
+ // instead. CKEditor and Media WYSIWYG modules with render with common <img>
+ // while frontend will render full <picture> output as usual.
+ if (module_exists('picture')) {
+ if (!empty($file->override['wysiwyg']) && !empty($displays['file_field_picture']['status'])) {
+ $displays['file_field_picture']['status'] = 0;
+ }
+ }
}
/**