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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devin Carlson’s picture

Assigned: Unassigned » Devin Carlson
Category: Feature request » Task
Issue summary: View changes
Status: Active » Needs review
Parent issue: » #1283844: [meta] Improve WYSIWYG integration
FileSize
155.17 KB

Awesome 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.

Devin Carlson’s picture

Status: Needs review » Fixed

After 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.

ParisLiakos’s picture

wow, you should slow down with changes like that. at least wait for some reviews first

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

juampynr’s picture

Component: WYSIWYG integration » Code

Yeah, 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.