Last active
July 27, 2022 07:43
-
-
Save bjoerntx/ae13fa556a90ec350d8b2c5450452edb 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 | |
@{ | |
var sDocument = "<html><body><p>Welcome to <strong>Text Control</strong></p></body></html>"; | |
} | |
@Html.TXTextControl().TextControl(settings => { | |
settings.UserNames = new string[] { "Tim Typer" }; | |
}).LoadText(sDocument, TXTextControl.Web.StringStreamType.HTMLFormat).Render() | |
<input type="button" onclick="insertTable()" value="Insert Table" /> | |
<script> | |
function insertTable() { | |
TXTextControl.tables.add(5, 5, 10, function(e) { | |
if (e === true) { // if added | |
TXTextControl.tables.getItem(function(table) { | |
table.cells.forEach(function(cell) { | |
cell.setText("Cell text"); | |
}); | |
}, null, 10); | |
} | |
}) | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment