Grapesjs: Icon on block manager

Created on 6 Sep 2017  路  2Comments  路  Source: artf/grapesjs

Hey, thank's for the great project.

I currently have a custom block made and it is working. I am trying to add an icon to this using font-awesome. I have looked through the source code and I am unable to figure out how to get an icon added like the rest of the button. I have tried putting SVG into the label attribute and adding className Neither of these seemed to work. Thanks for your help!

        editor.BlockManager.add('article', {
            id: 'article',
            label: 'FS',
            content: {
                type: 'text',
                content: 'content
            },
        });

Current Look:

image

outdated

Most helpful comment

I found it, added attributes: {class: 'fa fa-text'},

All 2 comments

I found it, added attributes: {class: 'fa fa-text'},

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

applibs picture applibs  路  3Comments

krunal039 picture krunal039  路  3Comments

Geczy picture Geczy  路  3Comments

alibouaziz picture alibouaziz  路  3Comments

kickbk picture kickbk  路  3Comments