Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
We had and have quite some trouble with the WYSIWYG integration provided by media.
I think one of the reasons is that people that should / would solely focus on the media handling are bothered with WYSIWYG stuff - which's quite another problem space.
There's enough work in the Media / File Entity world already, and interruptions by WYSIWYG stuff doesn't help getting the work there done.
Proposed resolution
We should begin by spinning-off the WYSIWYG functionality into a submodule and then potentially move it into its own project.
Comment | File | Size | Author |
---|---|---|---|
#1 | split-off-wysiwyg-functionality-2142571-1.patch | 155.17 KB | Devin Carlson |
Comments
Comment #1
Devin Carlson CreditAttribution: Devin Carlson commentedAwesome summary of the WYSIWYG problem/motivation for spinning off WYSIWYG integration!
I think that the scope of this issue should simply be to rip the current WYSIWYG integration out and put it into a submodule with no improvements or compatibility/API changes. That way, we can simply delete the submodule and use the submodule as a base for a separate WYSIWYG project in the next version of Media (if that is the direction that is decided on). To that end, I've moved much of the issue summary to #1283844: [meta] Improve WYSIWYG integration which tackles discussing WYSIWYG as a whole and serves as a parent issue to tasks like this one or #1504696: Integration with CKEditor module.
Have the WYSIWYG functionality contained in a submodule should also make working on it easier as you won't have to go looking through all of the various Media include/CSS/JS files for WYSIWYG-related functionality.
The attached patch removes all of the WYSIWYG functionality into a media_wysiwyg submodule. It doesn't change any variable names, filter names or wysiwyg names and is automatically enabled in an update function if the WYSIWYG module is installed.
Comment #2
Devin Carlson CreditAttribution: Devin Carlson commentedAfter a number of hours testing #1 with new and a variety of existing Media installations, I haven't run into any issues with WYSIWYG functionality or the upgrade path. All of the existing tests pass both locally and on drupal.org and the base media features including the media browser/field widget/file icon listing/bulk import functionality all continue to work properly.
Committed #1 to Media 7.x-2.x.
Comment #3
ParisLiakos CreditAttribution: ParisLiakos commentedwow, you should slow down with changes like that. at least wait for some reviews first
Comment #5
juampynr CreditAttribution: juampynr commentedYeah, at least such a change could have been made in a new branch. form media_format_form() was completely removed at the above commit. I was about to submit a patch about it when I found out that all of the code was gone. Finally added it at https://drupal.org/comment/8474953#comment-8474953.