Yahoo! Developer Network Home - Help

YDN Site Search

# YUI Library Examples: Rich Text Editor (beta): Default Toolbar Config

# Rich Text Editor (beta): Default Toolbar Config

This example simply shows the default toolbar config.

This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>This is some more test text.<br>

## SimpleEditor default toolbar config

The default toolbar config for YAHOO.widget.SimpleEditor.

collapse: true, titlebar: 'Text Editing Tools', draggable: false, buttons: [ { group: 'fontstyle', label: 'Font Name and Size', buttons: [ { type: 'select', label: 'Arial', value: 'fontname', disabled: true, menu: [ { text: 'Arial', checked: true }, { text: 'Arial Black' }, { text: 'Comic Sans MS' }, { text: 'Courier New' }, { text: 'Lucida Console' }, { text: 'Tahoma' }, { text: 'Times New Roman' }, { text: 'Trebuchet MS' }, { text: 'Verdana' } ] }, { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true } ] }, { type: 'separator' }, { group: 'textstyle', label: 'Font Style', buttons: [ { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' }, { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' }, { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' }, { type: 'separator' }, { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true }, { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true } ] }, { type: 'separator' }, { group: 'indentlist', label: 'Lists', buttons: [ { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' }, { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' } ] }, { type: 'separator' }, { group: 'insertitem', label: 'Insert Item', buttons: [ { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true }, { type: 'push', label: 'Insert Image', value: 'insertimage' } ] } ]

## Editor default toolbar config

The default toolbar config for YAHOO.widget.Editor.

collapse: true, titlebar: 'Text Editing Tools', draggable: false, buttonType: 'advanced', buttons: [ { group: 'fontstyle', label: 'Font Name and Size', buttons: [ { type: 'select', label: 'Arial', value: 'fontname', disabled: true, menu: [ { text: 'Arial', checked: true }, { text: 'Arial Black' }, { text: 'Comic Sans MS' }, { text: 'Courier New' }, { text: 'Lucida Console' }, { text: 'Tahoma' }, { text: 'Times New Roman' }, { text: 'Trebuchet MS' }, { text: 'Verdana' } ] }, { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true } ] }, { type: 'separator' }, { group: 'textstyle', label: 'Font Style', buttons: [ { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' }, { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' }, { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' }, { type: 'separator' }, { type: 'push', label: 'Subscript', value: 'subscript', disabled: true }, { type: 'push', label: 'Superscript', value: 'superscript', disabled: true }, { type: 'separator' }, { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true }, { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }, { type: 'separator' }, { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true }, { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' } ] }, { type: 'separator' }, { group: 'alignment', label: 'Alignment', buttons: [ { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' }, { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' }, { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' }, { type: 'push', label: 'Justify', value: 'justifyfull' } ] }, { 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' } ] }, { type: 'separator' }, { group: 'insertitem', label: 'Insert Item', buttons: [ { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true }, { type: 'push', label: 'Insert Image', value: 'insertimage' } ] } ]

### Rich Text Editor (beta) Examples:

- Flickr Image Search
- Calendar Plugin
- Icon Insertion
- Plain Text Switcher
- Editor Data Post with Connection Manager
- Skinning the Editor
- Default Toolbar Config
- Code Editor
- Editor inside a Tabview Control
- One Editor, Multiple Edit Areas
- Editor with Custom Image Browser
- Simple Editor — Basic Buttons
- Simple Editor — Advanced Buttons
- Editor — Basic Buttons
- Editor Auto Adjusting Height
- Custom resizing for the Rich Text Editor (included with examples for Resize Utility (beta))
- Simple Application (included with examples for Layout Manager (beta))
- Complex Application (included with examples for Layout Manager (beta))

### More Rich Text Editor (beta) Resources:

- User's Guide (external)
- API Documentation
- Cheat Sheet PDF (external)

Copyright © 2008 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings