editor-js / editor-js/simple-image-tutorial
Cannot use custom svg path / icons
- Dominant language
- JavaScript
- Stars
- 29
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Whenever I provide a custom SVG tag string or use `require('./icon.svg')` my ToolBar just shows empty square instead of an icon.
What I tried:
- providing any SVG path from [this website](http://svgicons.sparkk.fr/) and using `width="19" height="13" viewBox="0 0 19 13" xmlns="http://www.w3.org/2000/svg"` settings
- creating simple SVG path myself using [this path builder](https://codepen.io/anthonydugois/pen/mewdyZ)
- using any simple letter path from [this pen](https://codepen.io/scnijland/pen/xRGjBw)
- using any SVG from FontAwesome icon pack
Of course, if I use the SVG path provided in your repos icons show up as expected.
Is there any reason for this? Do you have a list of icons I could use that would work? I'd like to have even something as simple as a letter instead of picture icon.
Thank you for making this editor! It's great :)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the ToolBar icon handling and compare how repository SVG paths are supplied with the custom SVG tag and require('./icon.svg') examples. Determine why those inputs render as empty squares; done means a custom SVG or simple letter icon displays correctly, with the supported icon format documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100