You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > 2D Editor Library > newRichText

3.1 newRichText

D2Editor.newRichText()

Creates and returns a new 2D rich text editor. Default values are illustrated in Listing 3.4 .

Note

The program must resize the 2D editor before the text editor widget is painted the first time.

Listing 3.1: Default Values of a new 2D Rich Text Editor

editor:move(0, 0)
:setBorder(0)
:setBorderColor(0x000000)
:setColorable(false)
:setDisable2DinRT(false)
:setFontSize(<default system size>)
:setMainFont(<default system font>)
:setReadOnly(false)
:setSelectable(true)
:setTextColor(0x000000)
:setVisible(true)

Introduced in platform.apiLevel = '1.0'