[Question] Should default text-align property have icons?
Question
If styleManager is left out of the configuration, the default includes text-align with icons showing the choices.

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

Should this be the case since it's a "built in" property, or do I still need to manually add the icons?
Answers (2)
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
@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.
Issue #2381
[QUESTION] Is it possible to add info modal on the editor
Hi, I would like to add on the grapejs editor a clickable questionmark we can click so we could give information on what does this specific...
Issue #2710
[QUESTION] Unsplash images in asset manager modal
Hello, I want to add a support for unsplash API when user opens AsssetManager modal with search input (similar to Grapedrop) Is there an ea...
Issue #2148
[QUESTION] IE11 (Unable to get property 'style' of undefined)
Hi! Just faced the same issue: https://github.com/artf/grapesjs/issues/1295#issuecomment-410046832 While click on one of this buttons this....
Issue #2865
[QUESTION] enable 'view components' button on panel by default
this button is currently off by default. so you have to turn it on every time, which is not obvious to everyone. how do you make it active...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.