Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created November 21, 2023 11:15
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/603cc3b314e0754ede20290981c1c236 to your computer and use it in GitHub Desktop.
Save bjoerntx/603cc3b314e0754ede20290981c1c236 to your computer and use it in GitHub Desktop.
@using TXTextControl.Web.MVC
@Html.TXTextControl().TextControl().Render()
input type="button" onclick="doComplexFormatting()" value="Complex Formatting" />
<script>
var connectionID;
TXTextControl.addEventListener("textControlLoaded", function () {
connectionID = TXTextControl.connectionID;
});
function doComplexFormatting() {
TXTextControl.editMode = TXTextControl.EditMode.ReadOnly;
$.ajax({
url: '@Url.Action("DoComplexFormatting")',
type: 'POST',
data: { connectionID: connectionID },
success: function (data) {
TXTextControl.editMode = TXTextControl.EditMode.Edit;
}
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment