Yahoo YUI 2 - 富文本编辑器 - 如何将编辑器的标题栏更改为另一个字符串值?
我正在使用 Yahoo YUI 2 富文本编辑器。我想将编辑器窗口的 titlebar
从默认值 “文本编辑工具”
更改为不同的值...适合编辑器页面的值被放置在。
我从 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();
语法有问题吗?我不知道为什么它不起作用......
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....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
其中任何一个似乎都有效:
或者
Either of these seem to work:
or