Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-07-27 06:06:41

yerfdoggy
New member
Registered: 2005-07-27
Posts: 4

stylistLoadStyles is not a function

I have uncommented the last  line in this block of code from testbed.html as I gradually learn how to use Xinha:
--------------------
[CODE SAMPLE:]
xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();

// We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL
//  otherwise it won't work!
//  xinha_config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css'));
// Or we can load styles directly
    xinha_config.stylistLoadStyles('h1 { font:Arial }');
[END OF CODE SAMPLE]
---------------------
testbed.html stops working and I get the following message in firefox javascript console:
"xinha-config.stylistLoadStyles is not a function"

Sure enough, when I do a global search for a function stylistLoadStyles in all Xinha files, I find only "HTMLArea.Config.prototype.stylistLoadStyles" in stylelist.js - which does not appear to be what we are calling in the lines above.

I have no idea where to start debugging this, can anyone offer a clue? Thanks.

Offline

#2 2005-07-29 22:34:23

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: stylistLoadStyles is not a function

That is exactly what you are calling.  If you don't load the Stylist plugin, then that function isn't available.


James Sleeman

Offline

Board footer

Powered by FluxBB