Documentation

editor.collapse(bStart)

Collapses the current selection to a single point. The bStart is a boolean value.

Syntax

editor.collapse(bStart)

Parameter

Type: boolean

Optional. True collapses the Range to its start, false to its end. If omitted, it defaults to false.

Example usage

var editor1 = new RichTextEditor("#div_editor1");    
editor1.setHTMLCode("<b>hello world</b>");  
editor1.selectDoc()  
editor1.execCommand("forecolor","red");  
editor1.collapse(false);