Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created July 3, 2019 12:36
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/b2351311864dc45a44fb3bd198c5e1a9 to your computer and use it in GitHub Desktop.
Save bjoerntx/b2351311864dc45a44fb3bd198c5e1a9 to your computer and use it in GitHub Desktop.
editor.getSession().on('change', function () {
try {
$("#editor").notify("Data model updated!", { className: "success" });
var jsonData = editor.getValue();
JSON.parse(jsonData);
TXTextControl.loadJsonData(jsonData);
} catch (e) {
return false;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment