As you've pasted your code, myconfig doesn't exist when you start the editor and
render() it - you only define myconfig afterwards. So the editor's not going to
know anything about the changes you want to make.
Put the var myconfig = ... before the call to
> var myEditor = new YAHOO.widget.SimpleEditor('editor', myconfig);
> myEditor.render();
and it should work.
Matt
--- In ydn-javascript@yahoogroups.com, "totalharmonicdistortion"
<totalharmonicdistortion@...> wrote:
>
> Hi,
>
> I'm not sure if this is the right place to be posting but here it goes
> anyway. I'm happy to move this elsewhere.
>
> I'm trying to change the toolbar buttons on the editor widget and I
> can't seem to get it working.
>
> I'm creating the widget like this. Nothing fancy.
>
> The toolbar is always rendering the same no matter what I change the
> button config too. Am I missing a step?
>
> Thank you.
>
>
> var myEditor = new YAHOO.widget.SimpleEditor('editor', myconfig);
> myEditor.render();
>
>
> var myconfig = {
> height: '300px',
> dompath: true,
> focusAtStart: true,
> buttons: [
> { group: 'fontstyle', label: 'Text formatting',
> buttons: [
> { type: 'push', label: 'Ctrl + Shift + B',
> value: 'bold' },
> { type: 'push', label: 'Italic CTRL + SHIFT +
> I', value: 'italic' },
> { type: 'push', label: 'Underline CTRL + SHIFT +
> U', value: 'underline' },
> { type: 'push', label: 'Subscript', value:
> 'subscript', disabled: true },
> { type: 'push', label: 'Superscript', value:
> 'superscript', disabled: true },
> { type: 'color', label: 'Font Color', value:
> 'forecolor', disabled: true },
> { type: 'color', label: 'Background Color',
> value: 'backcolor', disabled: true },
> { type: 'color', label: 'Background Color',
> value: 'backcolor', disabled: true }
> ]
> },
> { type: 'separator' },
> { group: 'parastyle', label: 'Paragraph Style',
> buttons: [
> { type: 'select', label: 'Normal', value: 'heading',
> disabled: true,
> menu: [
> { text: 'Normal', value: 'none', checked:
> true },
> { text: 'Header 1', value: 'h1' },
> { text: 'Header 2', value: 'h2' },
> { text: 'Header 3', value: 'h3' },
> { text: 'Header 4', value: 'h4' },
> { text: 'Header 5', value: 'h5' },
> { text: 'Header 6', value: 'h6' }
> ]
> }
> ]
> },
> { type: 'separator' },
> { group: 'indentlist', label: 'Indenting and Lists',
> buttons: [
> { type: 'push', label: 'Indent', value:
> 'indent', disabled: true },
> { type: 'push', label: 'Outdent', value:
> 'outdent', disabled: true },
> { type: 'push', label: 'Create an Unordered
> List', value: 'insertunorderedlist' },
> { type: 'push', label: 'Create an Ordered List',
> value: 'insertorderedlist' }
> ]
> }
> ]};
>