Version 2 (modified by gogo, 16 years ago) (diff)



Back to Plugins

The Xinha Stylist plugin provides a "Panel" containing various developer supplied context sensitive CSS styles. Using this plugin the user is able to apply (and remove) one or more CSS classes to the (possibly implicit) selection.

The plugin is "smart", that is, it will understand classes that are only valid within context. For example if you supplied the plugin the following style

li.important { color:red }

it would only be avaliable in the stylist when the cursor is in an <li> element.

Using the plugin is quite simple.


  // We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL
  //  otherwise it won't work!

  // Or we can load styles directly
  cfg.stylistLoadStyles('p.red_text { color:red }');

  // If you want to provide "friendly" names you can do so like this
  cfg.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'});

  // or like this
  cfg.stylistLoadStylesheet('/mystyles.css', {'p.pink_text' : 'Pretty Pink'});

The plugin was developed by James Sleeman.

Attachments (1)

Download all attachments as: .zip