How do I adding new aloha-button in aloha-multisplit-expanded box. (I want the ability to add unlimted number of styles. of course, not via administrator, but hard coded)
How do I adding new aloha-button in aloha-multisplit-expanded box. (I want the ability to
Share
Adding style to aloha editor:
I will show here how to add simple style named “meg”
“button.meg.tooltip”:”Meg format desctiption”
At sites\all\libraries\aloha\aloha\plugins\common\format\lib\format-plugin.js add to “default button configuration” in “config” array, the name of the class, this way:
config: [‘strong’, ‘meg’, ‘em’….]
Add implementation for initialize style button in “initButtons” function:
Under switch(button), add ‘case’ for the new style:
Notice: ‘span’ tag used for implement ordinary css class with neutral tag.
Define the class “span.meg” as special style:
Add within your css main file (drupal site theme’s css) “span.meg” class:
Refresh your site for rebuild, and use the new style in floating aloha
Sample Code