missive / emoji-mart

🏪 One component to pick them all
https://missiveapp.com/open/emoji-mart
MIT License
8.59k stars 828 forks source link

Problem in load custom svg emojies #805

Open mj-mehdizadeh opened 1 year ago

mj-mehdizadeh commented 1 year ago

I have some svg files that I want to load them as custom Emojies, but the img of svg doesn't show anything.

  <img id="svg-boombox" src="./assets/boombox.svg" /> // this images is exist and loaded
  <img id="img-shipit" src="./assets/shipit.png" /> // this is exist and loaded
       custom: [
          {
            emojis: [
              {
                id: 'octocat',
                name: 'Octocat',
                keywords: ['github'],
                skins: [{ src: document.querySelector('#svg-boombox').src }], // for this svg file, it doesn't show anything
              },
              {
                id: 'shipit',
                name: 'Squirrel',
                keywords: ['github'],
                skins: [{ src: document.querySelector('#img-shipit').src }], // for this png file, it's show the image
              },
            ],
          },
        ],

image