Last active
September 22, 2023 14:36
-
-
Save danielsebesta/24a28fdaa30834f856d512b813006553 to your computer and use it in GitHub Desktop.
I use this code when I want to use Twemoji on a website π
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Twemoji html</title> | |
<script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script> | |
<script> | |
window.onload = function() { | |
twemoji.parse(document.body, | |
{folder: 'svg', ext: '.svg'} | |
); | |
} | |
</script> | |
<style> | |
img.emoji { | |
display: inline !important; | |
border: none !important; | |
box-shadow: none !important; | |
height: 1em !important; | |
width: 1em !important; | |
margin: 0 .07em !important; | |
vertical-align: -0.1em !important; | |
background: none !important; | |
padding: 0 !important; | |
pointer-events: none | |
} | |
</style> | |
</head> | |
<body> | |
<p>Some emojis lol π π€―</p> | |
</body> | |
</html> |
Hey thanks for this it was pretty helpful it was the only config on the internet lol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pog