I'm using CTools Modal for a form with a textarea - and I'm also using Wysiwyg which should attach to that textarea. But as you can guess it doesn't. I understand that the problem is in the fact that textarea is rendered only after ajax call and wysiwyg attaches itself on page render. But I couldn't figure out how to overcome and integrate it. Any help or advice appreciated.

Comments

merlinofchaos’s picture

There are two things we have to fix in order to make this work.

1) We need to ensure that the javascript files for anything that might appear in a modal appear on the page with the modal. We can probably do this with a global hook of some kind when the javascript for the modal is run. Or the wysiwyg js could be just added all of the time.

2) We need to get the settings to transmit through the modal. Right now this is harder. CTools is using an older method where we set settings onto the form, but that's really irritating. What we really need is for CTools to mine the results of drupal_add_js for javascript settings and go ahead and send those through so that all javascript settings work. WE did this for the version of the AJAX Framework that went into core, but it has not yet gotten backported.

With those two, we can greatly expand what javascript toys can work on items in the modal.

merlinofchaos’s picture

Status: Active » Fixed

Both of these items have been fixed. It's entirely possibly that most wysiwygs can work in CTools modals now.

Status: Fixed » Closed (fixed)

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

_petja’s picture

Did you figure this out AliraSirin? I'd appreciate any pointers on how to achieve wysiwyg textarea in ctools modal..

qqboy’s picture

Issue summary: View changes

how to use