views:

54

answers:

1

Hey all,

I expect this is a newbie question despite smashing my head against the YUI documentation.

I have a page with a YUI Simple Editor (called 'myEditor'). It hooks to a text area called 'posttext'. New editing is fine, but the problem I am solving right now involves the user clicking on one or more existing elements, and putting that text into the editor for revision/resubmission.

What I would like to do is set the contents programatically via JQuery. I've set the value without an issue, and I can see that it's set in firebug, but I expect there's some method of the editor itself that I need to run to get it to redisplay (I tried re-running the render method to no avail).

Thanks in advance! -Bob

+1  A: 

The function is named setEditorHTML()

See this example from the YUI Editor examples, third code block ("Now handle the toggle").

Pekka
That worked - ended up having another issue, and found out the hard way that moving around the YUI editor causes horrible things to happen (since fixed), but the function above was what I needed for this issue. Thanks!
Bob Palmer