How to use the toHtml function from @fortawesome/fontawesome-svg-core

Find comprehensive JavaScript @fortawesome/fontawesome-svg-core.toHtml code examples handpicked from public code repositorys.

145
146
147
148
149
150
151
152
153
154
    }).abstract;
    // We inject the "children" into the svg tag of the first icon
    spritesAbstract[0].children.push(...iconAbstract[0].children);
  });

  return fontawesome.toHtml(spritesAbstract[0]);
});

// Add collections
eleventyConfig.addCollection("posts", (collection) => {
fork icon0
star icon2
watch icon1

+ 47 other calls in file