question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support custom markup for icons in toolbar

See original GitHub issue

Is your feature request related to a problem? Please describe. I’m working on a Vue.js project where the icons are loaded as svgs with the Font Awesome vue package. Easymde is set up in a way which assumes the “classic” loading of font awesome icons, with <i class=""/> tags. The Fontawesome vue package is incompatible with this.

Describe the solution you’d like Ideally, easymde would provide a way to let me specify the markup for an icon for a toolbar entry. This could look something like this:

var easyMDE = new EasyMDE({
	toolbar: [{
			name: "bold",
			action: EasyMDE.toggleBold,
			title: "Bold",
                        markup: '<svg .../>'
		}
	]
});

(This would mean for me to redefne each toolbar entry, but as I’m refining the toolbar itself already for the layout, that’s not that much of a deal)

Describe alternatives you’ve considered An alternative would be to also load font awesome font files, which would create some clutter imho.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

3reactions
olavggcommented, Jan 14, 2020

I would prefer that icons was embedded as SVG images, just like Trix does. Relying on Font Awesome for just ~10 icons is in my opinion overkill.

1reaction
A-312commented, Mar 13, 2020

Rewrite FA class or add css class in your button

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add Custom Icons and Commands on the Editor Toolbar
It's possible to extend the toolbar with custom operations: Adding additional built-in commands; Adding custom HTML markup commands.
Read more >
How to use custom icons in toolbar items? - DevExpress Support
A toolbar item is represented by the dxCommand markup component. You can assign a custom icon to it via the icon or iconSrc...
Read more >
Toolbar icons for HTML markup? - Support - Joplin Forum
I'm using the Quick HTML tag plugin to let me apply custom CSS styles to text. Unfortunately markdown is far too limited for...
Read more >
Draw in apps with Markup on iPad - Apple Support
In the Markup toolbar, tap the pen, marker, or pencil tool, then write or draw with your finger or Apple Pencil (supported models)....
Read more >
Icons for custom toolbar tool - Bokeh Discourse
That said, a few notes may help: * The bokeh.icons stuff you linked is not related to toolbar icons at all. In any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found