How to get javasrcipt returnValue from webbrowser control (tinymce htmlcode fron webbrowser)

In my previous post about the htmlcontrol i have not explained how i communicate with the tinymce javascript to get the actual values from the textarea.

Here is it how it works...

string valueFromTinyMce;
IHTMLDocument2 htdoc2 = editor2.HTMLDocument2; IHTMLWindow2 parentWindow = htdoc2.parentWindow; if (parentWindow != null) { IHTMLElement el = htdoc2.createElement("input"); = "myValue"; ((IHTMLDOMNode)htdoc2.body).appendChild((IHTMLDOMNode)el); parentWindow.execScript("document.all['myValue'].value = tinyMCE.getContent('mce_editor_0')", "javascript"); valueFromTinyMce = el.getAttribute("value", 0); }

Latest Posts

Popular Posts