Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created April 28, 2020 07:18
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/9606ba5ec569366276e485e18373217a to your computer and use it in GitHub Desktop.
Save bjoerntx/9606ba5ec569366276e485e18373217a to your computer and use it in GitHub Desktop.
function mergeDocument() {
$("#infobox").text("Merging document...");
TXTextControl.saveDocument(
TXTextControl.StreamType.InternalUnicodeFormat, function (e) {
$.ajax({
type: "POST",
url: "/Home/MergeDocument",
contentType: "application/json",
data: JSON.stringify({
Document: e.data
}),
success: function (content) {
TXTextControl.loadDocument(
TXTextControl.StreamType.InternalUnicodeFormat,
content,
function () {
$("#infobox").text("Merged and loaded");
});
}
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment