1

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....

katura
  • 2,177
  • 14
  • 39
  • 48

1 Answers1

1

Either of these seem to work:

OpeningTextEditor.get('toolbar').titlebar = 'Opening Text';

or

OpeningTextEditor._defaultToolbar.titlebar = 'Opening Text';
mjhm
  • 16,497
  • 10
  • 44
  • 55
  • Thank you for your help. The 1st statement of code didn't work...not sure why...but the 2nd one did:) I don't think I would've ever figured out how to set the titlebar, so thank you very much for your help! – katura Aug 29 '11 at 19:08