i have winform application utilizes ckeditor text editor. have local file following setup:
<!doctype html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=emulateie5" /> <title></title> <script src="jquery-1.11.3.min.js"></script> <script src="ckeditor/ckeditor.js"></script> </head> <body> <form> <textarea name="editor1" id="editor1"></textarea> </form> <script type="text/javascript" language="javascript"> function gettexteditordata() { return ckeditor.instances.editor1.getdata(); } function settexteditordata(data) { ckeditor.instances['editor1'].setdata(data, function () { this.checkdirty(); }); //$('#editor1').val('the text '); } // replace <textarea id="editor1"> ckeditor // instance, using default configuration. ckeditor.replace('editor1', { fullpage: true, allowedcontent: true }); ckeditor.on('instanceready',function (evt) { var editor = evt.editor; editor.execcommand('maximize'); }); </script> </body> </html>
the file loaded webbrowser ckeditor loaded. trying accomplish, display data saved editor allow updates. in order so, have tried using invokescript method on webbrowser stuck permission denied error
the following snippet using:
string str = noticeentry.details.replace('"', '\''); sendjs("settexteditordata(" + str + ");"); private void sendjs(string jscript) { object[] args = { jscript }; webbrowser1.document.invokescript("eval", args); }
any resolutions helpful.
Comments
Post a Comment