I tried using ctl00$ContentPlaceHolder1$docFld on the TestFileGrabber.aspx page. Now the button does not do anything (check it out - I uploaded it).
I note that the CE editor ID is not ctl00$ContentPlaceHolder1 but ctl00$ContentPlaceHolder1$Editor1. I also tried to use ctl00$ContentPlaceHolder1$Editor1$docFld to no avail. You can view this case on TestFileGrabber3.aspx.
P.S. (later) It occurs to me that the problem is NOT that the editor is not being found - the button works just fine. What is not being found is the textarea. So, I put the following code in:
document.getElementById(
'<%=docFld.ClientID %>').value = links[links.length-1].href;
This replaces the "docFld" with a computed value - which includes the ContentPlaceholder...
And, IT WORKS!!!!
You might want to update your example code... :)
Thanks for your help.