Issue #1379πŸ’¬ AnsweredOpened August 23, 2018by Abhisheknanda13444631 reactions

How to replace style-manager font-awesome icon into svg?

Quick answerby artf❀ 1

Yeah put those changes inside your plugin

Read full answer below ↓

Question

hi @artf i Want to replace an icon of style manager with svg icon . As you can see screenshot attached. I tried dat way. screenshot from 2018-08-24 00-20-29

Answers (3)

artfβ€’ September 5, 2018

Yeah put those changes inside your plugin

grapesjs.init({
	...
	plugins: [
		// start your plugin
		editor => {
			...
			pnm.getButton('views', 'open-sm').set({
				label: '<svg>...</svg>'
			});
		}
	]
})
artfβ€’ August 24, 2018

???... your code is all broken (check the syntax) Probably you want something like this

pnm.getButton('views', 'open-sm').set({
	label: '<svg>...</svg>'
});
Abhisheknanda1344463β€’ August 27, 2018

Please re-open this issue. hi @artf I also tried this way pnm.getButton('views', 'open-sm').set({ label: <svg> width="1024" height="1024" viewBox="0 0 1024 1024" style="margin-left: calc(50% - 0.5em)"><g transform="scale(0.03125 0.03125)"><path d="M881.76 269.44c-43.36 52.704-162.24 198.24-256.672...

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 β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.