[Greasemonkey] How to reference IFrame
Matt Labrum
darktempler at gmail.com
Tue Nov 1 19:13:28 EST 2005
i wouldnt wait untill page load to run your "rteInitEditor();" , use an
eventlistener binded to your iframe load like..
iframe.addEventListener("load", rteInitEdtior, false);
then turn your design mode on , i also would recommend adding a listener
when the user clicks then check the designmode to see if its on.
heres how i reference my editor and set the beginning load listener and i
havnt had a problem with it not going into design mode.
var Editor = document.getElementById('edit');
EditorWin = Editor.contentWindow;
EditorDoc = Editor.contentDocument;
unsafeWindow.EditorWin = EditorWin;
unsafeWindow.EditorDoc = EditorDoc;
Editor.addEventListener("load", Start, false);
On 11/1/05, WHITEMARE2 <whitemare2 at delphiforums.com> wrote:
>
>
>
> from Taral taralx at gmail.com <http://gmail.com>
> Mon Oct 31 16:17:12 EST 2005
>
> >> Can you include the script so we can see it? In general, you shouldn't
> need onload events at all, since you're already running at
> load-complete time. >>
>
> I have attached the script. I had a lot of trouble with the load event on
> one of the pages. There seemed to be some sort of timing problem with
> setting the design mode of the IFrame. I finally was able to get it to work
> in GM 0.5. So there may be code that isn't really needed. My major
> question now is how to access the contents of the IFrame in my script in GM
> 6. In case it is helpful, here is an older screenshot of what the editor
> looks like, Some more buttons have been added since then.
>
> http://people.delphiforums.com/WHITEMARE2/editor/editor.gif
>
> thanks for your help.
>
>
>
>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
>
>
>
More information about the Greasemonkey
mailing list