Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created March 1, 2017 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/9f2051661ed619b0324d1f3b193216ef to your computer and use it in GitHub Desktop.
Save bjoerntx/9f2051661ed619b0324d1f3b193216ef to your computer and use it in GitHub Desktop.
// when entering the SubTextPart, check for the ID
// if 1 then set read and select
TXTextControl.addEventListener("subTextPartEntered", function (e) {
if (e.id == '1') {
TXTextControl.editMode = TXTextControl.EditMode.ReadAndSelect;
$('#tbSubTextPartName').val(e.name);
}
});
// set the edit mode to edit mode again
TXTextControl.addEventListener("subTextPartLeft", function (e) {
TXTextControl.editMode = TXTextControl.EditMode.Edit;
$('#tbSubTextPartName').val('');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment