In the JavaScript Console for Firefox 5 (Tools | Error Console) I was seeing this error message:
Error: Permission denied to access property 'command'
Source File: http://asp.mebito.com/RTE/RTE_javascript.asp?textArea=bigtextarea
Line: 135
I believe this is because I was embedding the RTE in an
< iframe > on a different domain. (This is part of my elaborate scheme to use RTE on a non-IIS web server.) Access to parent.command was triggering a security breach. Best I can figure from the .ASP code, parent.command was being used by the Web Wiz Wizards as a kind of global variable. The subject error would happen any time I'd use any of these features:
- Format
- Font
- Size
- Text Colour
- Background Colour
which were otherwise unresponsive. I seem to have fixed this by guessing that a different global variable scheme would work. So I made the following changes:
/RTE/RTE_javascript.asp circa line 251:
old:
parent.command = command;
new:
window.GlobalCommand = command;
/RTE/RTE_javascript.asp circa line 432:
old:
editor.contentWindow.document.execCommand(parent.command, false, selection);
new:
editor.contentWindow.document.execCommand(window.GlobalCommand, false, selection);
Not sure this doesn't break something else, but it got the above five features to work.