Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created May 6, 2020 14:17
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/f49ae11480ae82c3c573075b61600f7d to your computer and use it in GitHub Desktop.
Save bjoerntx/f49ae11480ae82c3c573075b61600f7d to your computer and use it in GitHub Desktop.
function loadDocument(document) {
TXTextControl.loadDocument(TXTextControl.streamType.InternalUnicodeFormat, document);
}
function saveDocument() {
return new Promise(resolve => {
TXTextControl.saveDocument(TXTextControl.streamType.InternalUnicodeFormat, function (e) {
resolve(e.data);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment