...and the winner is (works in both cf8 and cf9):
var ta = $("#f1 textarea[name='socialEventDescription']");
ColdFusion.RichText.setValue(ta.attr('id'),
responseData.socialEventDescription);
ta.val(responseData.socialEventDescription);
$("#dialog").dialog("open");
hth
Azadi
On 16/06/2010 02:22, Scott Brady wrote:
> Thanks! I'll try that.
>
>
> On Tue, Jun 15, 2010 at 12:02 PM, Azadi Saryev <[email protected]>wrote:
>
>> yeah, since cf9 uses newer version of ckeditor, some things have
>> changed...
>>
>> i have seen some rather weird stuff in my tests now with cf9.
>> i guess it has something to do with the textarea being initially hidden,
>> and then displayed when the dialog is displayed. this must be causing
>> some event chain to fire, which happens to make the ckeditor instance
>> associated with the textarea temporarily unavailable. i _think_ that
>> maybe the textarea instance is re-drawn (or maybe even drawn for the
>> first time) only after the dialog is visible (you may have noticed that
>> fckstyles.xml file is requested only after the dialog is shown), and
>> that causes the instance to not be defined for a moment.
>>
>> in any case - if you are still interested - firing the setValue() with a
>> delay of 1000 ms after the dialog is opened seems to solve the problem
>> in cf9:
>>
>> var ta = ColdFusion.RichText.getEditorObject('socialEventDescription');
>> if (ta) {
>> ColdFusion.RichText.setValue(ta.Name, str);
>> } else {
>>
>>
>> setTimeout(function(){ColdFusion.RichText.setValue(ColdFusion.RichText.getEditorObject('socialEventDescription').Name,
>> responseData.socialEventDescription);}, 1000);
>> }
>>
>> Azadi
>>
>>
>>
>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334585
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm