So I am having a nightmare trying to run ckeditor in wpf webbrowser control. Custom built ckeditor that our company is using for their websites, throws an error that points to nowhere.. line 0, yet it works everywhere else, including IE. Basic package, semi loads, but throws undefined error and stay greyed out in loading phase. This is with latest ck editor 4.7. I've tried using version 3.6 with which nothing happens at all, ckeditor throws no error, but doesnt load either ( works fine outside of wpf browser).
Here is some basic html code that I inject into the wpfbrowser.
WebBrowser webBrowser = dependencyObject as WebBrowser;
if (webBrowser != null)
{
var html = "<head>" +
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />" +
"<meta charset=\"UTF-8\">" +
// $"<script type=\"text/javascript\" src=\"{ResourceDir}MathJax\\MathJax.js?config=MML_HTMLorMML,default\"></script>" +
$"<script type=\"text/javascript\" src=\"{ResourceDir}ckeditor\\ckeditor.js\"></script>" +
$"<script type=\"text/javascript\" src=\"{ResourceDir}JavaScript\\essay.js\"></script>" +
// $"<link rel=\"stylesheet\" type=\"text/css\" href=\"{ResourceDir}\\CSS\\main.css\">" +
"</head>" +
"<body>" +
" <form>\r\n" +
" <textarea name=\"editor\" id=\"editor\" rows=\"10\" cols=\"80\">\r\n" +
$"Hello World!" + /*{e.NewValue}*/
" </textarea>\r\n" +
" </form>"+
" <button onclick=\"ReplaceEditor()\">Click me</button> " +
"</body>";
webBrowser.NavigateToString(html);
Other javascript such as MathJax and so on works just fine, please ignore the way I build HTML, its not relevant now.
This is essay.js content
function ReplaceEditor() {
CKEDITOR.replace('editor');
}
window.onerror = function (message, url, lineNumber) {
window.external.GetErrors(message, url, lineNumber);
}
catching errors doesnt help much as it returns same line 0 char 0 that webbrowser throws for all errors . Any help appreciated, from what I've read it should be working as people made it work before.