getEditorValue ();
The getEditorValue method returns mask editor value.
To execute the example, connect links to the PP.js library and the PP.css visual styles table on the HTML page. Create a mask editor used to enter time. Add the Click event handler:
<script type="text/javascript">
var MEtime = new PP.Ui.MaskEdit({
ParentNode: document.getElementById("ME2"),
Width: "170px",
Height: "21px",
Mask: "__:__",
RegExpContent: "^(0\\d|1\\d|2[0-3]):([0-5]\\d)$"
});
MEtime.setValue("10:10");
MEtime.Click.add(function(sender, args) {
alert("Editor value: " + MEtime.getEditorValue());
});
</script>
After executing the example the HTML page contains a masked editor for entering time value with a defined value. A message that contains editor vale is shown on clicking the editor entry box.
NOTE. Unlike the MaskEdit.getLastValidValue method, getEditorValue gets any editor value, including the values that do not correspond to a regular expression.
See also: