Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active January 26, 2017 13:43
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/fc3fcac3e47993009dab71b544c08dca to your computer and use it in GitHub Desktop.
Save bjoerntx/fc3fcac3e47993009dab71b544c08dca to your computer and use it in GitHub Desktop.
function subTextPartEnteredHandler(e) {
if (e.name == "protected")
TXTextControl.editMode = TXTextControl.EditMode.ReadAndSelect;
}
function subTextPartLeftHandler(e) {
TXTextControl.editMode = TXTextControl.EditMode.Edit;
}
TXTextControl.addEventListener("subTextPartEntered", subTextPartEnteredHandler);
TXTextControl.addEventListener("subTextPartLeft", subTextPartLeftHandler);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment