Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created December 16, 2023 14:16
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/72e85db382e5705cc884b1d87a6e7703 to your computer and use it in GitHub Desktop.
Save bjoerntx/72e85db382e5705cc884b1d87a6e7703 to your computer and use it in GitHub Desktop.
@using TXTextControl.Web.MVC
@Html.TXTextControl().TextControl().LoadDataFromJson(ViewBag.Data).Render()
<input type="button" onclick="mergeDocument()" value="Merge Document" />
@section Scripts {
<script>
function mergeDocument() {
TXTextControl.saveDocument(TXTextControl.StreamType.InternalUnicodeFormat, function (results) {
$.ajax({
url: '@Url.Action("Merge")',
type: 'POST',
contentType: "application/json",
data: JSON.stringify(results),
success: function (data) {
TXTextControl.loadDocument(TXTextControl.StreamType.InternalUnicodeFormat, data);
}
});
});
}
</script>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment