Created
January 6, 2022 12:13
-
-
Save bjoerntx/962d1bf5743d250b72759cd239e38113 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TextControl = TextControl || {}; | |
TextControl.saveDocument = function (dotNetObject) { | |
// save the document on TXTextControl object | |
TXTextControl.saveDocument(TXTextControl.StreamType.InternalUnicodeFormat, function (document) { | |
// call the .NET method 'ProcessDocument' with the saved document data | |
dotNetObject.invokeMethodAsync('ProcessDocument', document.data); | |
}); | |
}; | |
TextControl.loadDocument = function (document) { | |
// load the document back into the editor (TXTextControl) | |
TXTextControl.loadDocument(TXTextControl.StreamType.InternalUnicodeFormat, document); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment