Closed (fixed)
Project:
D7 Media
Version:
7.x-3.x-dev
Component:
Media WYSIWYG
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2013 at 08:02 UTC
Updated:
25 May 2017 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drupal_was_my_past commentedHere's the patch.
Comment #2
genjohnson commentedThe patch in #1 works for me.
Comment #3
gmclelland commentedWould this patch fix the problem in #2028255: ckeditor styles break media module markup? The problem where applying Ckeditor styles(css classes) to media items breaks the media token?
Comment #4
justmagicmaria commentedPatch #1 worked for me except when the image uses the Colorbox display. Then the attributes from the image ckeditor pop=up are not saved.
Comment #5
bneil commentedUsing a new install of the media_dev profile, I can add CKEditor style markup without the need for this patch. WYSIWYG module + CKEditor library 3.6.6.1.7696. However, the styles do not apply if "Link image to" is set to file or content at admin/structure/file-types/manage/image/file-display/view-mode.
Is this a CKEditor 4.x issue only?
Comment #6
rwohlebPatch #1 works for me as well. Doing something like changing alignment in CKeditor and then adjusting the image's format via the media popup no longer loses the style attributes. The problem @justmagicmaria mentioned sounds like something outside of wysiwyg_allowed_attributes is needed.
Marking this is RTBC since it's such a simple change and more than one of us has tested it.
Comment #7
rwohlebThis patch, along with the one from #2126697: Wysiwyg -- Alt and Title fields require some special handling. goes a long way to address this type of sync issue.
The #2018075: Media inline filter: Delegate "float" to outer element patch is also very useful in combination with the above.
Comment #8
mkhamash commentedI have re-rolled the patch in #1 to work with the latest change to media media.popups.js file introduced in (Improved JS doxygen [2095d6b9]).
Comment #9
mkhamash commentedComment #10
rajab natshah+1 Reviewed and Tested
Comment #11
joseph.olstadNot sure if we need this anymore, as we now have the optional dropdown for image alignment
none|right|left|centrehowever, this might still work with the new functionality. so it might be worth reviewing still.
would require re-testing with newest versions of media 7.x-2.1 or 7.x-3.0-alpha5
need to test this also with ckeditor media_ckeditor / or wysiwyg with TinyMCE or other.
Comment #12
gmclelland commentedThis wouldn't just be for alignment. I would like to be able to add a css style from the styles dropdown to add a padded border around an inserted image or a linked imaged.
See the picture below for an example:

Comment #15
joseph.olstadfixed in 7.x-2.x dev and 7.x-3.x dev