Closed (fixed)
Project:
Wysiwyg
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2011 at 11:06 UTC
Updated:
4 Jan 2012 at 10:40 UTC
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
Comment #1
twodCould 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!
Comment #2
medden commentedThat helps masses thanks very much twoD