This library defines editor methods for handling HTML style attribute. CSS properties of HTML objects can easily be get, set, and toggled.

The demo shows how you can define alignment buttons in a simple way.

Library files:

  1. bue.style.js

Button code:

jsE.toggleStyle('text-align''center''div');

API:

//Toggle a CSS property
E.toggleStyle(PROPERTY, VALUE, TAG);
//Add CSS properties
E.styleSelection({PROPERTY:VALUE PAIRS}, TAG);//(PROPERTY, VALUE, TAG) is also possible
//Remove CSS properties
E.styleSelection({PROPERTY:null PAIRS});//(PROPERTY, null) is also possible
//Read a CSS property of the selection
BUE.getStyle(E.getSelection(), PROPERTY);//If PROPERTY is not given, all property:value pairs are returned.
Under supervision of Drupal :)