Problem/Motivation
Due a recent commit (from a patch I wrote) on #2720997: Overridden fields not encoded in token this module is now overriding an entire javascript function from the media_wysiwyg module: Drupal.media.formatForm.getOptions(). In hindsight, there is a big problem with this: This module won't get any features/fixes that happen in the media_wysiwyg module. This is bad, because the media_wysiwyg version has important things, like support for multi-value fields.
Proposed resolution
No longer override that function in this module.
There is a catch though: the override here WAS doing something useful, namely capturing input entered into CKEditor text areas in the "format form" where editors configure embedded media. So we need to make sure that this only gets committed after a yet-to-be-written patch in the Media module that reproduces this feature: #2833190: Support CKEditor (module) for long text fields in "format form"
Remaining tasks
Write this patch.
Review this patch
Write a patch for Media to reproduce what we are losing here.
Review patch in Media that reproduces what we are losing here: #2833190: Support CKEditor (module) for long text fields in "format form"
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | override-getEditorContent-instead-of-getOptions_2833107-7.patch | 1.96 KB | LittleRedHen |
Comments
Comment #2
brockfanning commentedComment #3
brockfanning commentedComment #4
brockfanning commentedComment #5
brockfanning commentedComment #6
LittleRedHen commentedI have tested the patch from #2 together with the matching media patch, and can confirm that the combination works fine on my bleeding-edge media + media_wysiwyg + media_ckeditor setup (which currently involves a lot of patches, but none that ought to change how this works).
Comment #7
LittleRedHen commentedI also submitted an alternate solution on the media module thread at https://www.drupal.org/node/2833190#comment-11812554 which split the 'fetch content from my custom editor' bit out into a function that is designed to be overridden, which would mean the media module doesn't need to know the details of all the possible editors.
Here's the media_ckeditor patch which works with that variation: it overrides the new function, instead of the whole getOptions function, and so doesn't need to deal with encoding or any of the other media-token-specific details.
You should only apply this patch if you're also applying the matching patch on the media module (or if that patch has been committed).
Comment #8
brockfanning commentedComment #10
joseph.olstadin dev of media_ckeditor
requires media 7.x-2.x dev , or beta14 which hasn't yet been released /nor tagged
Comment #12
joseph.olstadnote: beta14 was tagged since I last commented.
However, I recommend the latest currently, which is 7.x-2.0-rc1 (released today)
also, both media and media_ckeditor have a 7.x-2.0-rc1 release , same date.