Last active
October 31, 2022 20:52
-
-
Save bjoerntx/bcde5aecdbf47abd3bd680a8feb9d9c0 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
@using TXTextControl.Web.MVC.DocumentViewer | |
@using System.Text | |
<div style="width: 800px; height: 600px;"> | |
@Html.TXTextControl().DocumentViewer(settings => { | |
settings.BasePath = "https://localhost:7198"; | |
settings.DocumentData = Convert.ToBase64String( | |
Encoding.ASCII.GetBytes("<strong>Sample Content</strong>")); | |
settings.Dock = DocumentViewerSettings.DockStyle.Fill; | |
}).Render() | |
</div> | |
<script> | |
var jsonAnnotations = '[[{"pen":{"type":"comment","objectWidth":32,"objectHeight":32},"user":"Unknown User","location":{"x":127,"y":50},"time":1658908087097,"comments":[{"comment":"Welcome to Text Control","user":"Unknown User","date":1658908100339,"id":"c8d818ce-ff1e-4c0c-b78c-6ba95a98dede","status":"none"}],"id":"feed80ff-1c94-4abf-9838-3e833faa4092","status":"Accepted"}]]'; | |
window.addEventListener("documentViewerLoaded", function () { | |
TXDocumentViewer.annotations.showToolbar(true); | |
TXDocumentViewer.annotations.load(jsonAnnotations); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment