I was able to enable the "Add media" button on ckeditor by marking the checkbox Media browser on admin/config/content/wysiwyg/profile/<input_format>/edit, but I only see that checkbox when adding ckeditor.

I mean I was expecting to see the same checkbox for any other editor, but for example when adding markitUp editor, I do not see it.

How should I enable it? Is there a way to do that? Is it a restriction for that editor? (I tried also with WYMeditor with the same result)

Comments

marvil07’s picture

To make a complete report:

I am using wysiwyg 7.x-2.0

I was able to enable the Add media button on:

  • CKEditor 3.5.1.6398
  • TinyMCE 3.3.9.3

I was not able to enable the Add media button on:

  • YUI editor 2.8.2
  • openWYSIWYG 1.4.7
  • Whizzywig 61
  • jWYSIWYG 0.6
  • NicEdit 0.9
  • WYMeditor 0.5-rc1
  • markItUp 1.1.9

Is there something to do for each editor in order for this to work?

kunago’s picture

I myself am interested in being able to use the browser with other editors but am pretty weak with JavaScript. I looked at the files that should be adding the functionality and it appears to be all in "media/javascript/wysiwyg-media.js".

james.elliott’s picture

The other WYSIWYGs do not work because there has been no integration between their APIs and the media module.

marvil07’s picture

@james.elliott: I see, then I would be glad to provide integration for markitUp if you can point me to where the integration is done on ckeditor or tinymce

marvil07’s picture

Project: D7 Media » Wysiwyg
Version: 7.x-1.0-beta3 » 7.x-2.0
Component: User interface » Editor - markItUp
Status: Active » Needs review
StatusFileSize
new1.86 KB

I was trying to find where to start, but it seems like markitup editor wysiwyg implementation needs to be chnaged :-/

So, I am moving this to its issue queue for feedback and attaching the patch against wysiwyg module.

Does this patch make sense as a initial part?

Any suggestions will be appreciated.

twod’s picture

Title: Enable 'Add media' button for wysiwyg editors » Add Drupal plugin support
Version: 7.x-2.0 » 7.x-2.x-dev
Category: support » feature
Status: Needs review » Needs work

Yes, you're on the right track.

The hardest part is the JavaScript side of the implementation which needs to pass content around to these cross-editor plugins before (attach()</code) and after (<code>detach()) the editor handles it so they can do things like replacing placeholders etc.

To get that right, one must know the editor's API pretty well, and/or how to work around it to figure out if there are any events or callbacks one can use to run the the integration code. It also helps to know quite a bit about cross-browser problems. I hope you've got your reference books/siites close at hand, you're in for quite a ride. ;)

jpstrikesback’s picture

sub