开发者

How do I programmatically (via JQuery) set the content of the YUI text editor?

开发者 https://www.devze.com 2022-12-18 04:53 出处:网络
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

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 c开发者_如何学运维licking 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 programmatically 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).


The function is named setEditorHTML()

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号