Issue #2223💬 AnsweredOpened August 27, 2019by benvmatheson0 reactions

Should default text-align property have icons?

快速解答by ramusesan

hi @benvmatheson all you have to do is include fontawesome in your project and add the class Names reference for font awesome: https://www.w3schools.com/icons/fontawesomeiconsintro.asp i.e _if you want to put your own icons also its possible with css className or you can use any other librarys like font awesome librar...

Read full answer below ↓

Question

If styleManager is left out of the configuration, the default includes text-align with icons showing the choices. image

If I include a styleManager configuration and add text-align, it uses words instead. image

Should this be the case since it's a "built in" property, or do I still need to manually add the icons?

Answers (2)

ramusesanAugust 28, 2019

hi @benvmatheson all you have to do is include fontawesome in your project and add the class Names

reference for font awesome: https://www.w3schools.com/icons/fontawesome_icons_intro.asp

i.e

{
                                property: 'text-align',
                                defaults: 'left',
                                list: [
                                    { value: 'left', name: 'Left', className: 'fa fa-align-left' },
                                    { value: 'center', name: 'Center', className: 'fa fa-align-center' },
                                    { value: 'right', name: 'Right', className: 'fa fa-align-right' },
                                    { value: 'justify', name: 'Justify', className: 'fa fa-align-justify' }
                                ],
                            },

if you want to put your own icons also its possible with css className or you can use any other librarys like font awesome library

artfSeptember 4, 2019

@benvmatheson I preferred not to bind the font-awesome dependency (that I still hope to remove soon) to the property factory

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.