cpr.controls.TextEditor
The parent class of the input series component
Index
Event |
Description |
animationend |
Event that occurs after the animation ends. |
animationstart |
Event that occurs at the start of the animation. |
dispose |
The event that is called when the control is dispose. |
measure-size |
Event raised when calculating control size |
transitionend |
Event that fires after CSS property transition ends. |
transitionstart |
Event that fires when CSS property transition starts. |
Name |
Type |
Description |
accessKey |
String |
Returns the keyboard shortcut character. |
accessbility |
Accessbility |
Gets the accessibility-related ARIA properties or gets the context in which they can be specified. |
displayText |
String |
Gets the value of the HTML Element shown in the input. |
displayingText |
String |
Gets the value of the HTML Element shown in the input. |
disposed |
Boolean |
Returns whether the control should be removed. |
editable |
Boolean |
Returns whether the value can be changed by user action. |
enabled |
Boolean |
Returns whether the control is enabled. |
fieldLabel |
String |
Returns the logical field name of the control. |
focusable |
Boolean |
Returns whether the control is focusable. |
focused |
Boolean |
Returns whether the control has focus. |
id |
String |
Returns the ID of the control. |
name |
String |
Returns the name of the control. |
readOnly |
Boolean |
Returns whether a non-modifiable read-only mode is in effect. |
style |
UIControlStyler |
Returns the style settings of the control. |
tabIndex |
Number |
Returns the control focus sequence using the Tab Key. |
text |
String |
Returns the text shown in the control. |
tooltip |
String |
Returns a description of the control |
type |
ControlType |
Returns the signature string of the Control's unique Type that can distinguish the Control. |
uuid |
String |
Returns the unique ID of the control. |
value |
String |
Returns the value of the control. |
visible |
Boolean |
Returns the style property for controlling css visibility. |
Events
CEvent The event that is called when the control is dispose.
Properties
declaring type
|
AccessableUIControl |
type
|
String |
get
|
Returns the keyboard shortcut character.
|
set
|
Keyboard shortcut Sets a single character (letter or number).
The shortcut key is [alt] + [shortcut key] for Windows or [option] + [shortcut key] for Mac.
|
declaring type
|
UIControl |
type
|
Accessbility |
readonly
|
Gets the accessibility-related ARIA properties or gets the context in which they can be specified.
|
declaring type
|
TextInput |
type
|
String |
readonly
|
Gets the value of the HTML Element shown in the input.
|
declaring type
|
TextInput |
type
|
String |
readonly
|
Gets the value of the HTML Element shown in the input.
|
declaring type
|
Control |
type
|
Boolean |
readonly
|
Returns whether the control should be removed.
|
declaring type
|
UIControl |
type
|
Boolean |
readonly
|
Returns whether the value can be changed by user action.
UIControl (Output, etc.) that does not allow input returns false.
In the case of an inputtable UIControl, returns true if the binding context in which the value is bound is valid.
Otherwise, it returns false even if it is an inputtable UIControl.
Accordion/Button/Group/Dialog/EmbeddedApp/EmbeddedPage/Grid/HTMLObject/Image/MDIFolder/Menu/
NavigationBar/Notifier/Output/Progress/TabFolder/Shell/FileUpload
In the case of the above control, editable is always false.
|
declaring type
|
EnableUIControl |
type
|
Boolean |
get
|
Returns whether the control is enabled.
|
set
|
Sets whether to activate the control.
|
declaring type
|
UIControl |
type
|
String |
get
|
Returns the logical field name of the control.
|
set
|
Sets the logical field name of the control.
|
declaring type
|
UIControl |
type
|
Boolean |
readonly
|
Returns whether the control is focusable.
|
declaring type
|
UIControl |
type
|
Boolean |
readonly
|
Returns whether the control has focus.
|
declaring type
|
Control |
type
|
String |
readonly
|
Returns the ID of the control.
|
declaring type
|
UIControl |
type
|
String |
get
|
Returns the name of the control.
|
set
|
Sets the name of the control.
|
declaring type
|
EnableUIControl |
type
|
Boolean |
get
|
Returns whether a non-modifiable read-only mode is in effect.
|
set
|
Sets whether to enable read-only mode, which can not be modified.
|
declaring type
|
UIControl |
type
|
UIControlStyler |
readonly
|
Returns the style settings of the control.
In case of style changes, only the corresponding control is updated.
Propagation from style changes does not occur.
|
declaring type
|
AccessableUIControl |
type
|
Number |
get
|
Returns the control focus sequence using the Tab Key.
This property controls the tabindex in HTML.
|
set
|
Set the control focus order using Tab Key.
This property controls the tabindex in HTML.
|
declaring type
|
TextInput |
type
|
String |
get
|
Returns the text shown in the control.
|
set
|
Sets the visible text in the control.
|
declaring type
|
VisibleUIControl |
type
|
String |
get
|
Returns a description of the control
It works when mouse over.
|
set
|
Set a description for the control.
It works when mouse over.
|
declaring type
|
Control |
type
|
ControlType |
readonly
|
Returns the signature string of the Control's unique Type that can distinguish the Control.
Please refer to ControlType for available constant values.
For UDC controls, each unique type name is returned. Example: udc.MyUDC
|
declaring type
|
Control |
type
|
String |
readonly
|
Returns the unique ID of the control.
|
declaring type
|
TextInput |
type
|
String |
get
|
Returns the value of the control.
|
set
|
The value of the control is set, and a value-change event is raised.
|
declaring type
|
VisibleUIControl |
type
|
Boolean |
get
|
Returns the style property for controlling css visibility.
|
set
|
Sets the style property to control css visibility.
|
Methods
Add listeners by EventType to the control.
Add a listener to the control to handle when a specific event occurs.
var button = new cpr.controls.Button("btn01");
button.addEventListener("click", function(e) {
// event code...
});
name |
type |
description |
type
|
String |
|
listener
|
(e: cpr.events.CEvent)=>Void |
|
Add a listener to the control that will run only once per EventType.
Add a listener to the control to handle when a specific event occurs.
The added listener is automatically deleted after running once.
Since the object of the added listener is changed, when the listener is deleted
It is an object returned after calling addEventListenerOnce and can be deleted.
var button = new cpr.controls.Button("btn01");
button.addEventListenerOnce("click", function(e) {
// event code...
});
name |
type |
description |
type
|
String |
|
listener
|
(e: cpr.events.CEvent)=>Void |
|
return
|
(e: cpr.events.CEvent)=>Void |
The modified Listener object. |
Bind that property.
name |
type |
description |
name
|
String |
|
Removes focus from the control.
Determines whether to run the Control's Default Event Handler depending on the state of the Control.
name |
type |
description |
e
|
CEvent |
event |
return
|
Boolean |
Whether the control's event handler is running. |
Forwards specific events.
name |
type |
description |
e
|
CEvent |
|
return
|
Boolean |
Whether to continue processing the default action after propagating the event. |
Removes the objects contained in the control.
Find the parent control.
If includeSelf is true, the parent including the self is found.
name |
type |
description |
predicate
|
(c: cpr.controls.UIControl)=>Boolean |
|
includeSelfoptional
|
Boolean |
defaultfalse
|
Whether you include yourself. |
Assigns focus to the control.
name |
type |
description |
forwardoptional
|
Boolean |
defaulttrue
|
|
Moves focus to the next control.
If there are multiple structural elements that have focus inside a control, focus may transition to the next element.
Moves focus to the previous control.
If there are multiple structural elements that have focus inside a control, focus may transfer to the previous element.
Gets the bounds value of the control relative to the browser's view port.
If the control is not drawn on the screen, an object with all values of 0 is returned.
return
|
Rectangle |
About the position and size of controls in the HTML DOM |
Gets the bounds value of the control relative to the browser's view port.
If the control is not drawn on the screen, an object with all values of 0 is returned.
name |
type |
description |
includeWrap
|
Boolean |
If this value is true, the layout of the parent group gets the area of the node surrounding this control. If false, only get the area of the control node. |
return
|
Rectangle |
About the position and size of controls in the HTML DOM |
Gets the bounds value of the control relative to the browser's view port.
If the control is not drawn on the screen, an object with all values 0 is returned.
name |
type |
description |
options
|
{
includeWrap?: Boolean,
scaled?: Boolean
} |
|
Returns the App to which the control belongs.
Returns the bind context.
Returns the bind property information for the control.
name |
type |
description |
name
|
String |
|
Returns all custom DOM DATA attribute names.
return
|
String[] |
An array of all custom DOM DATA attribute names. |
Returns the control to be moved by Tab Key or by the autoskip property.
The area being displayed is obtained based on the parent container to which it belongs.
name |
type |
description |
includeWrapoptional
|
Boolean |
defaultfalse
|
If this value is true, the layout of the parent group gets the area of the node surrounding this control. If false, only get the area of the control node. |
Shift + Tab Returns the focus to be moved through the key.
Returns the text corresponding to the selection range of the input box.
name |
type |
description |
range
|
{
start: Number,
end: Number
} |
selection range |
Returns the text corresponding to the entered selection range.
name |
type |
description |
start
|
Number |
Start selection range |
end
|
Number |
end of selection |
Get information about the selection area of the input box.
return
|
{
start: Number,
end: Number
} |
selection area |
Returns the selection area (start, end, text).
A selection area represents information with a starting location, ending location, and text to select.
return
|
{
start: Number,
end: Number,
text: String
} |
Information about the selection area (start, end, text). |
Returns all custom attribute names.
return
|
String[] |
An array of all custom attribute names. |
Gets the closest parent UI control.
Unlike getParent(), it finds nearby parent controls, including external apps.
Specifies custom DOM properties.
name |
type |
description |
key
|
String |
The attribute name to assign |
value
|
String |
The attribute value to specify. |
Returns a custom DOM property.
name |
type |
description |
key
|
String |
The attribute name to get. |
return
|
String |
Custom properties. |
Specify multiple custom DOM properties at once.
name |
type |
description |
values
|
{[key:string]: String} |
A JSON object containing custom attribute keys/values. |
Get all custom DOM properties in the form of a map.
return
|
{[key:string]: String} |
|
Returns whether the queried property is bindable and the binding has been configured to obtain a valid value.
Even if no binding is configured and a simple value is specified, it is treated as configured so that a valid value is obtained.
For example, binding to a row index that does not exist in the DataSet is an invalid binding.
name |
type |
description |
name
|
String |
|
Make sure it is a bindable property.
name |
type |
description |
name
|
String |
|
return
|
Boolean |
Confirmation. |
Returns whether the control is floating through an app instance or a specific container.
Returns the status that the screen is showing. Returns false if the visible state of all parents including itself is false.
Sets the value of the control.
name |
type |
description |
value
|
String |
The value of the control. |
Removes all event listeners for the control.
Delete all custom DOM DATA attributes.
Delete all custom attributes.
Remove Listener for each EventType in the control.
control.removeEventListener ('click', listener); code> pre>
name |
type |
description |
type
|
String |
Event type. |
listener
|
(e: cpr.events.CEvent)=>Void |
Event listeners. |
Remove all EventType listeners from the control.
control.removeEventListeners ('click'); code> pre>
name |
type |
description |
type
|
String |
Event type. |
Removes the user-defined DOM DATA attribute for a specific attribute name.
name |
type |
description |
key
|
String |
The custom DOM DATA attribute name to remove. |
Removes user-defined attributes for a specific attribute name.
name |
type |
description |
key
|
String |
The custom attribute name to remove. |
Sets the bind context.
container.setBindContext({dataControl:grid.dataSet,rowIndex:rowIndex})
Sets the control to be moved by Tab Key or by the autoskip property.
name |
type |
description |
nextControl
|
UIControl |
control. |
Shift + Tab Set the focus to be moved through the key.
name |
type |
description |
prevControl
|
UIControl |
control. |
Replace or insert a string in the selection range of the input box.
name |
type |
description |
replacement
|
String |
String to replace or insert |
start
|
Number |
Start of range to replace |
end
|
Number |
end of range to replace |
Replace or insert a string in the selection range of the input box.
name |
type |
description |
replacement
|
String |
String to replace or insert |
range
|
{
start: Number,
end: Number
} |
Range of strings to replace |
The text entered is replaced or inserted in the selected selection area, and the focus is moved.
editor.setSelection({start: 0, end: 8, text: "inputbox"});
name |
type |
description |
selection
|
{
start?: Number,
end?: Number,
text?: String
} |
Text to select, insert, or replace |
Set the selection area of the input box.
name |
type |
description |
selectionStart
|
Number |
Start selection |
selectionEnd
|
Number |
end of selection |
Unbind that property.
name |
type |
description |
name
|
String |
|
Specifies custom properties.
name |
type |
description |
key
|
String |
The attribute name to assign |
value
|
String |
The attribute value to specify. |
Returns a user-defined property.
name |
type |
description |
key
|
String |
The attribute name to get. |
return
|
String |
Custom properties. |
Specify multiple custom properties at once.
name |
type |
description |
values
|
{[key:string]: String} |
A JSON object containing custom attribute keys/values. |
Get all custom properties in the form of a map.
return
|
{[key:string]: String} |
|
Specifies custom data. Unlike user-defined attributes, you can use arbitrary types in addition to strings.
When the control is dispose, all custom data is removed.
name |
type |
description |
key
|
String |
The key of the data to be specified. |
value
|
Object |
Data to specify. |
get custom data
name |
type |
description |
key
|
String |
The key of the data to get. |
Specifies multiple user-defined data.
name |
type |
description |
override
|
{[key:string]: Object} |
A JSON object containing user-defined data. |
Get all your custom data.
return
|
{[key:string]: Object} |
|
Returns a user-defined property.
return
|
Object |
Custom properties. |