You are not logged in.
this setting is from htmlarea.js line 179. i have had to set it like this and it works:
// external stylesheets to load (REFERENCE THESE ABSOLUTELY)
this.pageStyleSheets = ["http://www.mydomain.com/style/style.css"];
that works, but it causes problems, because i am using this on lots of different sites and it would be very useful if i could use a relative path. I actually created my own hack for this in the old HTMLAREA like this:
editor._doc = doc;
if (!editor.config.fullPage) {
doc.open();
var html = "<html>\n";
html += "<head>\n";
if (editor.config.baseURL)
html += '<base href="' + editor.config.baseURL + '" />';
html += "<style>" + editor.config.pageStyle +
" html,body { border: 0px; }</style>\n";
//STYLE SHEET HACK
html += "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style/style.css\" />\n";
//****************
html += "</head>\n";
html += "<body>\n";
but it looks like some functionality has been added to Xinha to basically do exactly what i was trying to do... however i can no longer do it relatively. is there any way that I can accomplish this? Thanks.
Last edited by KingMoore (2005-04-06 17:33:34)
Offline
any ideas how to reference a relative style sheet?
Offline
this.pageStyleSheets does exactly the same as your hack!
if you look at the code:
if(typeof editor.config.pageStyleSheets !== 'undefined')
{
for(style_i = 0; style_i < editor.config.pageStyleSheets.length; style_i++)
{
if(editor.config.pageStyleSheets[style_i].length > 0)
html += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + editor.config.pageStyleSheets[style_i] + "\">";
//html += "<style> @import url('" + editor.config.pageStyleSheets[style_i] + "'); </style>\n";
}
}
you see that you can use any url here....
so that realtive urls don't work anymore might be another problem?
...but whats the problem with absolute urls anyway?
Niko
Offline
yeah that is what i was thinking. but i am confused because before i had
../style/style.css
and it worked fine... now it doesn't.
i can't use absolute URLs because they would need to be manually changed for every site I place this on and I am trying to avoid that. I was able to avoid it with HTMLArea using ../style/style.css
Offline
hmm... look at your web-server-logs if the css-file is requested, or use a sniffer or the Live Http Headers-extension for FF
Niko
Offline
I do not understand.
Offline
...for debug-purpose you might want to know if the browser requests the css-file (or WHAT css-file the browser requests)
and i told you some ways how you can do that
(i'm sure there others/betters? too)
Niko
Offline
thanks.
Offline