ronghuaxiang / wmd

Automatically exported from code.google.com/p/wmd
0 stars 0 forks source link

Editor doesn't show when called from an iframe #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The code points, for example in the wmd.js on line 52 to the
top.document.blahblah.

This doesn't work when the script is called from an iframe

Original issue reported on code.google.com by joshavan...@gmail.com on 15 Jun 2008 at 9:08

GoogleCodeExporter commented 8 years ago
It may if the iframe is on the same server...?

Original comment by rosanna....@gmail.com on 24 Apr 2009 at 3:18

GoogleCodeExporter commented 8 years ago
No, it has nothing to do with the server or domain: 
A solution I found was to replace all the occurrences of the word 'top' in the 
code 
with the word 'this'.

So top.document.blabla becomes this.document.blabla

Original comment by joshavan...@gmail.com on 2 May 2009 at 8:22

GoogleCodeExporter commented 8 years ago
Hm- i made this modification - but the problem remains... 
Perhaps b/c i'm also serving the HTML from another directory... 

Original comment by benjamin...@gmail.com on 24 Mar 2010 at 6:56