Stage::GetCurrent().Add( editor );
~~~
-~~~{.js}
-// JavaScript
-
-var editor = new dali.TextEditor();
-
-dali.stage.add( editor );
-~~~
-
When the TextEditor is tapped, it will automatically gain the keyboard focus. Key events will then result in text being inserted.
After text has been entered, it can be retrieved from the TEXT property.
std::cout << "Received text: " << editorText.Get< std::string >() << std::endl;
~~~
-~~~{.js}
-// JavaScript
-
-console.log( editor.text );
-~~~
-
### Font Selection
By default TextEditor will automatically select a suitable font from the platform. However, a different font could be selected. See the [Font Selection](@ref font-selection) section for more details.
editor.SetProperty( TextEditor::Property::HORIZONTAL_ALIGNMENT, "BEGIN" ); // "CENTER" or "END"
~~~
-~~~{.js}
-// JavaScript
-
-editor.HorizontalAlignment = "BEGIN"; // "CENTER" or "END"
-~~~
-
### Copy and Paste (Selection)
Text can be selected by a long press or double tapping it. See the [Copy and Paste](@ref copy-n-paste) section for more details.
editor.SetProperty( TextEditor::Property::TEXT_COLOR, Color::CYAN );
~~~
-~~~{.js}
-// JavaScript
-
-editor.textColor = dali.COLOR_CYAN;
-~~~
-
### TextEditor Properties
- Name (JavaScript) | Name (C++) | Type | Writable | Animatable
+ Name (JSON) | Name (C++) | Type | Writable | Animatable
-----------------------------------|--------------------------------------|--------------|--------------|-----------
renderingBackend | RENDERING_BACKEND | INTEGER | O | X
text | TEXT | STRING | O | X
outline | OUTLINE | STRING | O | X
inputOutline | INPUT_OUTLINE | STRING | O | X
-@class TextEditor
*/