Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active October 23, 2017 21:48
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/6bfeabdd16fee4138a1534e7121b1c4d to your computer and use it in GitHub Desktop.
Save bjoerntx/6bfeabdd16fee4138a1534e7121b1c4d to your computer and use it in GitHub Desktop.
@{
ViewData["Title"] = "Home Page";
}
<div class="row">
<div class="col-md-8 editor">
<iframe id="TXTextControl" src="http://localhost:2957/"></iframe>
<input type="button" value="Load Selection" onclick="SendMessage()" />
</div>
</div>
<script>
function SendMessage() {
var receiver = document.getElementById('TXTextControl').contentWindow;
var message = `{"txtextcontrol": {"method": "loadDocument",
"parameter": "This is some <b>HTML</b> text."
}}`;
receiver.postMessage(message, 'http://localhost:2957/');
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment