Fckeditor Javascript Api Throws "security Error" Code: "1000" When I Attempt Sethtml()
Solution 1:
FCKeditor's SetHTML
method relies on a document.write
call to replace the content in the edit control. Unfortunately document.write
does not work from within the Web Console on Firefox.
This is a known bug: Using document.write inside Scratchpad window brings up 'Security error undefined' in Web Console
I know that error says Scratchpad and the error message is different but it's the same problem. Note this comment from David Chan (Mozilla Security Researcher):
This appears to be another bug from running WebConsole / ScratchPad in a sandbox.
The reason you probably remember being able to do this in the past is because it works in FireBug, and it works in Chrome. You've probably used one of those environments in the past when working with a FCKeditor control.
Solution 2:
Pretty sure this is some cross domain issue where you probably think you're running on the same domain but actually are not. I would have to inspect the actual page this runs on to really be able to help you out, but try loading all the relevant fckeditor files using relative file paths (optionally from the root) and never include the actual domain, that will prevent a lot of trouble in general (what for example otherwise may happen is you being on example.com but loading files from www.example.com or similar problems).
The odd thing is that you shouldn't be able to read files then either, but the triggered error is about unpriviliged actions which are nearly always cross domain issues (or some very tricky cross script context issues, but those are mostly only relevant if you develop addons).
Solution 3:
If your javascript is coming from "http://webmaker.ooo.cz/...", then it's possible you're getting a domain issue if you're browsing the website under a different subdomain than the javascript is being pulled from. I'm not sure of a fix, and I'm not sure that's necessarily what's wrong. Just a possibility. I'd suggest trying to put the javascript you're using in the page with the html just to make sure the code itself actually works.
Post a Comment for "Fckeditor Javascript Api Throws "security Error" Code: "1000" When I Attempt Sethtml()"