Closed losciur closed 6 months ago
Use the marked-emoji
extension.
<head>
...
<script type="module">
import ZeroMd from 'https://cdn.jsdelivr.net/npm/zero-md@next'
import { markedEmoji } from 'https://cdn.jsdelivr.net/npm/marked-emoji@1/src/index.js'
import { Octokit } from 'https://esm.sh/@octokit/rest'
const octokit = new Octokit()
const res = await octokit.rest.emojis.get()
const emojis = res.data
customElements.define(
'zero-md',
class extends ZeroMd {
async load() {
await super.load()
this.marked.use(markedEmoji({ emojis, unicode: false }))
}
}
)
</script>
</head>
<body>
...
<zero-md src="example.md></zero-md>
</body>
Closing for now, feel free to reopen.
Sorry I forgot to reply... all is working! Thanks!
Hi, actually, github markdown emoji (https://gist.github.com/rxaviers/7360908) are not working for me.
Is it correct?
Do you think to add emoji in future release?
Thanks for you work!