Page 1 of 1

<base href> causing blank preview?

PostPosted: Wed Sep 15, 2010 5:48 pm
by jastuk
Hey :)

I think I may have pinpointed the cause of the problem, but I don't really have the knowledge to solve it.
Recreating it however, takes practically no effort:

I'll do this with a localhost example:
1) Download WYMeditor from this site and put it in the localhost root (or wherever)
2) Edit the html file of the basic example. (For me, that's: "http://localhost/wymeditor/examples/01-basic.html")
3) Add the <base href> in <head> (In my case: <base href="http://localhost/wymeditor/">)
4) Since I've defined the base href, I need to tweak the javascript path correctly. In my case it would look like this:
<script type="text/javascript" src="./jquery/jquery.js"></script>
<script type="text/javascript" src="./jwymeditor/jquery.wymeditor.min.js"></script>

And thats pretty much it :)
By simply adding the <base href> to the basic example that comes bundled in the download, the preview window goes blank.
I'm assuming its a path issue, but i don't know how to solve it. (and yes, i need the <base href>)

Additional info: as far as I know: this does not cause a "blank preview" in Firefox & Opera, but does in Chrome, Safari, and IE.

Does anyone know how i could get this working?
Or any additional info on how to make my own custom preview easily? how does it pull the data?

Thx in advance :)