Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created November 23, 2023 14:08
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/943f4c43eb3f981f201503c7c39b544a to your computer and use it in GitHub Desktop.
Save bjoerntx/943f4c43eb3f981f201503c7c39b544a to your computer and use it in GitHub Desktop.
function saveDocument() {
TXTextControl.saveDocument(TXTextControl.StreamType.InternalUnicodeFormat, function (content) {
$.ajax({
type: "POST",
url: "/Home/Save?id=@Model.DocumentId",
contentType: "application/json",
data: JSON.stringify(content),
success: function () {
setDirtyFlag();
$("#save").addClass("disabled");
},
error: function () {
alert("An error occurred while saving the data.");
}
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment