[英]Yahoo YUI 2 - Rich Text Editor - how do I change the titlebar of the Editor to another string value?
我正在使用Yahoo YUI 2富文本编辑器。 我想将编辑器窗口的titlebar
从其默认值"Text Editing Tools"
更改为其他值...一个适合于放置编辑器页面的值。
我在YUI 2.x论坛中看到了这个示例-
myEditor.toolbar.set('titlebar', 'Foo');
但这对我不起作用。
我的编辑器是这样创建的-
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();
语法有问题吗? 我不知道为什么它不起作用...
这些似乎工作:
OpeningTextEditor.get('toolbar').titlebar = 'Opening Text';
要么
OpeningTextEditor._defaultToolbar.titlebar = 'Opening Text';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.