簡體   English   中英

Yahoo YUI 2-RTF編輯器-如何將編輯器的標題欄更改為另一個字符串值?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM