Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Currently, when you create a video media entity or embed one in the WYSIWYG editor, it renders at an enormous size because it is a responsive video and therefore constrained only by the size of its container. By default, videos should always appear at a more manageable size.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2765525-30-8.2.x.patch | 10.72 KB | phenaproxima |
Comments
Comment #2
phenaproximaPostponing on #2726889: Provide an Entity Browser implementation.
Comment #3
balsamaComment #4
phenaproximaI suggest this as a Lightning 8.x-1.01 target.
Comment #5
phenaproximaThis is blocked, at the moment, by #2765525: Add AJAX command to add style sheets to CKEditor instances. When that is committed, we can attack this.
Comment #6
balsamaUnblocked, and - I think - fixed elsewhere. @phenaproxima can you confirm/link/close?
Comment #7
phenaproximaWe'll need an 8.2.x version of #2765525: Add AJAX command to add style sheets to CKEditor instances to get this done. And here it is!
Comment #8
phenaproximaSo I have made a branch on GitHub, 8.x-video-sizing, that opens the door to solving this forever. When Embed is returning a preview response, Lightning will apply any incoming CSS to the CKEditor instance, as well as the main window. Therefore, if a module or theme wants to make all responsive videos 50% of the CKEditor's width, they can attach CSS to do that. Before, they could attach the CSS but it would only be applied to the main window and have no effect in an iframe CKEditor instance.
Okay, so this doesn't directly solve the question of video sizing, and that is OK -- I think we'd prefer Lightning not to have an opinion about user-facing presentational things of that kind. But it most definitely solidly patches this functionality hole in core!
Comment #9
balsamaThanks for this. Travis is happy: https://travis-ci.org/acquia/lightning/builds/183687723
Comment #12
balsamaComment #13
phenaproxima