The Text Editor Object

text editor object is a rich text to HTML editor that supports inserting media, tables, and links and styling text.

var teSample = new TTextEditor(400, 300);
var wndTextEditorSample = createWindow('Text Editor Sample');

wndTextEditorSample.add(teSample);
showModal(wndTextEditorSample);

Light Text editor constructor takes nine parameters:

new TTextEditor(width, height, foldersUrl, filesUrl, addMediaUrl, editMediaUrl, deleteMediaUrl, searchUrl, saveImageUrl);

Where:

Text Editor Methods and Properties
Method/Property Description
clear Clears text editor content
getContent Gets text editor HTML content
getText Gets text editor plain text
setContent Sets text editor HTML content. Form: setContent(content)
setOnValidation Sets validation callback. Form: setOnValidation(callback)
setOnSaveCallback Sets save editor content callback. Form: setOnSaveCallback(callback)
setText Sets text editor plain text content. Form: setText(text)