I have a field called "Page Type" on my nodes... It performs some jQuery alterations to the input form, such as hiding other fields etc.
I would like one option from this drop down to select the WYSIWYG input filter.
Currently I have...

$('.filter-list').val('wysiwyg');

Which is changing the value in the Input Filter to WYSIWYG... but it is not firing up the wysiwyg options on the node body.
That only happens if I select WYSIWYG manually.
Does anyone know what I need to add to my jQuery to get the node body to change to WYSIWYG style input?
Thank in advance.

It replicates the "Text Format" drop down, plus some

Comments

twod’s picture

Status: Active » Fixed

Could you give an example of what the FAPI code looks for the form?

Wysiwyg listens for the select element's change event to trigger attaching/detaching editors. The value of the original format select element must change since Wysiwyg uses the selected value to determine which editor profile is to be the current one.

It looks like simply changing the value does not trigger the change event (at least not in IE). But if I called $('select.filter-list').change() right after changing the value, it did trigger properly.

Hope that helps!

medden’s picture

That helps masses thanks very much twoD

Status: Fixed » Closed (fixed)

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