Skip to content Skip to sidebar Skip to footer

Yahoo Yui 2 - Rich Text Editor - Can't Get Seteditorhtml Method To Work, What's Wrong?

Today, for the first time, I came across the YUI 2 Rich Text Editor. (http://developer.yahoo.com/yui/editor/) I mainly use Java Server Pages for my websites. I want to be able to s

Solution 1:

There is a time while the editor is rendering which you cannot access setEditorHTML. Try this:

var myEditor = newYAHOO.widget.Editor('msgpost', {
    height: '300px',
    width: '522px',
    dompath: false, //Turns on the bar at the bottomanimate: false, //Animates the opening, closing and moving of Editor windowshandleSubmit: true
});

myEditor.render();
// I just took a guess on which event to use here
myEditor.on('windowRender', function() {
    myEditor.setEditorHTML("Hello World");

});

Here is a list of YUI Editor events.

Post a Comment for "Yahoo Yui 2 - Rich Text Editor - Can't Get Seteditorhtml Method To Work, What's Wrong?"