SCEditor

width()

width() Since: 1.3.5

Gets the current width of the editor in px.

Syntax

var val = instance.width();

Return

Type: Int

The width in pixels

width(value) Since: 1.3.5

Sets the width of the editor.

Syntax

instance.width(value);

Parameters

value
Type: Int or String

Should either be the width in pixels or a string percentage.

Return

Type: sceditor

Example

Set the width to 200px:

var textarea = ...;
sceditor.instance(textarea).width(200);
var textarea = ...;
sceditor.instance(textarea).width('100%');