RichTextEditor Demo
Home Pricing

## editor.createToolbarDropDown

Creating a dropDown in toolbar with default styles. For details, please refer to plugin example.

#### Syntax

`editor.createToolbarDropDown(option,cmdname)`

###### Return value

`Type: object`

`The option object allows you set fillinput and fillpanel option.`

`Type: String`

`The name of a command.`

###### Return value

`Type: HTMLElement`

`A toolbar dropdown.`

## Example:

1. var editor1 = new RichTextEditor("#div_editor1");
2. var option={}
3. option.fillinput=function(span){span.innerText='select..'}
4. option.fillpanel=function(panel){panel.style.width='80px';panel.innerHTML='<div>a</div><div>b</div>'}
5. var dropdown=editor1.createToolbarDropDown(option,"mycmd");
6. editor1.container.parentNode.insertBefore(dropdown,editor1.container);