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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JeffM2001 created an issue. See original summary.

JeffM2001’s picture

Status: Active » Needs review
FileSize
939 bytes