Home   Pricing

editor.createToolbarButton(cmdname)

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

Syntax

editor.createToolbarButton(cmdname)

Return value

Type: String

The name of a command.

Return value

Type: HTMLElement

A toolbar button.

Example:

  1. var editor1 = new RichTextEditor("#div_editor1");   
  2. var btn=editor1.createToolbarButton("bold");  
  3. btn.style.width="32px"  
  4. btn.style.height="32px"  
  5. editor1.container.parentNode.insertBefore(btn,editor1.container);