Examples

editor.setImageForCommand

Adds an image (svg or png) for cmdname to the element. For details, please refer to plugin example.

Syntax

editor.setImageForCommand(element,cmdname)

Return value

Type: HTMLElement

The specified HTML Element.

Return value

Type: String

The name of a command.

Example:

var editor1 = new RichTextEditor("#div_editor1");     
var btn=document.createElement("span");    
btn.style.cssText="width:32px;height:32px;display:inline-block;border:solid 1px darkgreen";  
editor1.container.parentNode.insertBefore(btn,editor1.container);    
editor1.setImageForCommand(btn,"bold");