Replaces UTF-8 emoji in reveal.js presentations with corresponding images (based on twemoji)
yarn add twemoji
yarn add grunt-contrib-copy --dev
Copy assets in gruntfile.js
:
copy: {
twemoji: {
files: [
{
expand: true,
cwd: 'node_modules/twemoji/dist',
src: '**',
dest: 'lib/'
}
]
}
}
...
grunt.registerTask('twemoji-reveal', ['copy:twemoji'])
scripts: {
...
"start": "grunt twemoji serve"
}
<script src="lib/dist/twemoji.min.js"
Reveal.initialize({
...
dependencies: [
{ src: 'plugin/reveal-twemoji/reveal-twemoji.js'}
]
})
.reveal section img.emoji {
height: 1em;
width: 1em;
margin: 0 .05em 0 .1em;
vertical-align: -0.1em;
}