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

3.26 setWordWrapWidth

D2Editor:setWordWrapWidth(width)

Sets the rich text editor word-wrapping width in pixels. Ignored if the editor is in 2D mode. To indicate widget width, sets to 0. To disable wrapping, sets to < 0. The width must be -32767 to 32767.

Note

When word wrapping is disabled, that is the width is < 0, and ellipses are added to cut words, the negative value of the width specifies the margin from the right of the widget before ellipses are used.

Returns the text editor object.

Introduced in platform.apiLevel = '2.0'