Hi,

There are couple of steps users need to do to use the wysiwyg integration with media module, basically after installing the module user needs to:

1> Enable the Media Browser Plugin from wysiwyg profile.
2> Add the media filter to one of the input formats associated with wysiwyg profile.

To provide out of the box experience, we might need to automate these steps for the user (Or maybe not? ) After some discussions on then 2nd task, various opinions came out:

a) Enable the filter for FULL HTML input format on module enable
b) Create a new format with the needed filters
c) Have a notice on page as you enable the module to add the filter to the input format, if wysiwyg is installed too. This could be combined message for 1 and 2 above.
d) Give a notice to add filter to input format on plugin enable in wysiwyg profile. (Need to check with WYSIWYG API)
e) Add a notice via JS when media browser is invoked on WYSIWYG texteditor.

Any other ideas?

We need to think of most unobtrusive yet intuitive approach according to the use cases and would really like to provide out of the box experience.

Comments

aaron’s picture

we could also form_alter the wysiwyg profile configuration form to give a notice if either (a) the media checkbox is checked, or (b) no checkboxes are checked, assuming its associated filter doesn't have the proper formatter enabled. for that matter, we could also check on any page such a wysiwyg is enabled. again, that requires digging into the wysiwyg api -- maybe sun could help there.

sun’s picture

In 7.x, we'll likely move the entire Wysiwyg profile configuration onto the text format configuration page; deeply connected with #313497: Allow configuration of advanced editor settings

This is not a unique demand of Media module - all editor plugins that are (also) bound to an input filter require it. Moving the editor configuration to the text format page will slightly help here, but we'll need additional JS/AJAX logic to validate every single editor plugin against all enabled/disabled filters. In the same way, you can improperly configure the HTML filter, so your editor might show formatting options that are not allowed in the end.

See also:
#478184: Integrate Wysiwyg with "Input formats" Configuration Pages
#487690: Improve installation instructions

JacobSingh’s picture

Until what @sun is referring to becomes a reality, see the media_dev profile (http://drupal.org/project/media_dev) which does this stuff.

Perhaps it should be moved to the core media module? (If only modules had "install profiles").

Best,
J

JacobSingh’s picture

It will be great if someone comes along to do this. Probably won't be me though, so volunteers? :)

effulgentsia’s picture

Category: task » feature
dave reid’s picture

Version: » 7.x-2.x-dev
Component: Code » WYSIWYG integration
arthurf’s picture

Agreed that 2.x should be able to handle most of this configuration out of the box.

dave reid’s picture

Status: Active » Fixed

We've committed #1238772: Disable the 'Media browser' WYSIWYG button until it has been enabled for the text format which should help alleviate this for new setups. Doesn't seem like WYSIWYG has made much progress at all on the linked issues. I don't see anything else actionable, so I'm going to mark this issue as fixed.

Status: Fixed » Closed (fixed)

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