简体   繁体   English

Yahoo YUI 2-RTF编辑器-如何将编辑器的标题栏更改为另一个字符串值?

[英]Yahoo YUI 2 - Rich Text Editor - how do I change the titlebar of the Editor to another string value?

I'm using the Yahoo YUI 2 rich text editor. 我正在使用Yahoo YUI 2富文本编辑器。 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. 我想将编辑器窗口的titlebar从其默认值"Text Editing Tools"更改为其他值...一个适合于放置编辑器页面的值。

I saw this example from the YUI 2.x Forum - 我在YUI 2.x论坛中看到了这个示例-

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';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM