When accessing CKEditor from within a webview in a Windows 8 app, the editor fails to load completely. With some assistance from an MS Evangelist, we tracked down the issue and I thought I'd post the fix here for posterity:
In the Web Control (and not in IE 10 or anywhere else), the document.domain property is URL-encoded, turning “test.package” into “test%2package”... Consequently, the check “document.domain == window.location.hostname” fails and editor and controls end up in different origins.
To work around this issue, open ckeditor.js, search for “var a=document.domain” and change it into “var a=unescape(document.domain)”.
Cheers,
Mike
Hi Mike,
Hi Mike,
thank you for investigating this issue and posting a solution! I opened ticket #10334 for this on our Development site. You can comment the ticket if you have something to add and if you do so, you will automatically be notified about its progress.
Is there anything else that prevents CKEditor from working in this environment?
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
Hi Anna,
Hi Anna,
Thanks for acting on this. There's nothing else that stops CKEditor in this environment, I've tested it and it's working fine after the aforementioned change.
Sample code
@tempy is there any chance you could provide reduced sample application showing this problem?
I can see solution but it would be nice if you could show us working code that is causing problems first :)
Hi,
Hi,
I have tried looking for code like var a=document.domain or document.domain == window.location.hostname. We have something similar in env.js file but it isn't the same.
Could you explain exactly what file(s) have you changed in CKEditor so that other users could know?
Hi Mike,
Hi Mike,
I tried it with a windows store app in java script but it does not work there. The call CKEDITOR.replace('editor1') does nothing because 'CKEDITOR.env.isCompatible' is false.
Do you have any experience in that field?
Thank you, Charlott