Created
April 16, 2019 21:25
-
-
Save bjoerntx/697afcb8c288dcd1547208c55ebbd1d4 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
<input type="button" onclick="loadEditor()" value="Load Editor" /> | |
<div id="editor"></div> | |
<script> | |
function loadEditor() { | |
// check, if editor exists and | |
// closes the WebSocket connection gracefully | |
// and removes the whole editor from the DOM. | |
if (typeof TXTextControl !== 'undefined') | |
TXTextControl.removeFromDom(); | |
// load the partial view | |
$('#editor').load('@Url.Action("EditorPartial")'); | |
} | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment