0

We use Wygwam for client to enter their content to EE. Client would like to enter order list type with A,B,C,D instead of 1,2,3,4. Can someone give me a hint how can I add option to client to choose order list type on the icon bar?

Thanks, Angela

0

Following along with the Wygwam documentation you should be able to do this using the style set.
https://docs.pixelandtonic.com/wygwam/using/style_set.html

Your style set code would need to look something like:

CKEDITOR.stylesSet.add( 'my_styles',
[
        { name : 'Ordered List', element : 'ol', attributes : { 'class' : 'list-alpha' } },
]);

Once you've made your list, highlight it and click the Styles dropdown. You should see your newly created style. enter image description here

Once selected if you check the source you should see it attached to the element.

From here you'll need to add some css to that element. Something like:

.list-alpha {list-style-type: upper-alpha;}
3
  • Thanks Michael! I follow your instructions, I able to see Ordered List, but it overwrite all other Block Styles and Object Styles which is set as default. Do you know how to append instead of overwrite all setting? Thanks Jun 30 '16 at 16:13
  • Is it possible to add those styles to the list-alpha class? I'll look into appending. Jun 30 '16 at 17:25
  • I kind of work around, instead of class, I add type CKEDITOR.stylesSet.add( 'my_styles', [ { name : 'Alpha Ordered List', element : 'ol', attributes : { 'type' : 'a' } } ]); it shows up as Alphia Ordered List, but it overwrite all default style Jun 30 '16 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.