The head tag is a universal include (via php) for all the administration pages.
My problem is this: I was using an older 1.x version of FCKeditor. Some pages (lists of content, the main entry for the administrator page etc) DO NOT have the textarea with the ID to be replaced.
With the 1.x version editor, I got no errors. With the latest version, I get a dialogue pop-up that warns me that the textarea is missing (which it is on some pages)
When I get to a page where there is the appropriate textareas, the script works fine.
Can I disable the warning in the lastest version?
Path to my config file: http://www.rdcan.ca/FCKeditor/fckconfig.js
Why don't you check that the textarea does exist before trying to replace it?
The problem was - the head tag is an include as the admin pages load different sections, so on some pages the text area does not exist, some it does.
Here is the script with changes: