Examples

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:

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