I'm trying to do something similar to the what Panopoly Magic does — wrapping Drupal.wysiwyg.editor.attach.tinymce()
to add event handlers — but in a different context (in this case form_builder). Unfortunately, even though the form I'm working on has nothing to do with panopoly_magic, wysiwygTinymceBeforeAttach()
still runs, and generally "wins" so its TinyMCE setup function replaces the one I'm trying to add.
I think the optimal solution would be to only load panopoly-magic.js where it's needed (instead adding it unconditionally to every page), but I can't figure out where to put the drupal_add_js()
in order to make that happen. Instead, the solution I'd propose is to check for the panopoly-textarea-autosubmit
class before adding the setup function.
Comment | File | Size | Author |
---|---|---|---|
#2 | panopoly_magic-wysiwyg-wrap-2924074-2.patch | 939 bytes | JeffM2001 |
Comments
Comment #2
JeffM2001 CreditAttribution: JeffM2001 commented