I'm using the Yahoo YUI 2 rich text editor. I would like to change the titlebar
of the editor window from its default value of "Text Editing Tools"
to a different value... one that fits with the page the editor is placed on.
I saw this example from the YUI 2.x Forum -
myEditor.toolbar.set('titlebar', 'Foo');
But that doesn't work for me.
My 开发者_开发问答editor is created like this -
var OpeningTextEditor = new YAHOO.widget.Editor('OpeningText', {
height: '300px',
width: '522px',
dompath: false, //Turns on the bar at the bottom
animate: false, //Animates the opening, closing and moving of Editor windows
handleSubmit: true
});
//***** T H I S L I N E D O E S N'T W O R K ******
//OpeningTextEditor.toolbar.set('titlebar','Opening Text');
OpeningTextEditor.render();
Is there something wrong with the syntax? I don't know why else it wouldn't work....
Either of these seem to work:
OpeningTextEditor.get('toolbar').titlebar = 'Opening Text';
or
OpeningTextEditor._defaultToolbar.titlebar = 'Opening Text';
精彩评论