Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created October 8, 2020 11:53
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/7fa5e7feeadc485e2cca73fffb0dc481 to your computer and use it in GitHub Desktop.
Save bjoerntx/7fa5e7feeadc485e2cca73fffb0dc481 to your computer and use it in GitHub Desktop.
function mergeDocument() {
TXTextControl.saveDocument(TXTextControl.streamType.InternalUnicodeFormat,
function (e) {
var serviceURL = "/Home/MergeDocument";
$.ajax({
type: "POST",
url: serviceURL,
contentType: 'application/json',
data: JSON.stringify({
Document: e.data,
}),
success: successFunc,
error: errorFunc
});
function successFunc(data, status) {
TXTextControl.loadDocument(TXTextControl.streamType.InternalUnicodeFormat, data);
}
function errorFunc(error) {
console.log(error);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment