Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown, Code Highlighting and Emojis #4

Open
BaroDevelopment opened this issue Aug 1, 2019 · 5 comments
Open

Markdown, Code Highlighting and Emojis #4

BaroDevelopment opened this issue Aug 1, 2019 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@BaroDevelopment
Copy link

hi,
can you add support for Markdown, Code Highlighting and Emojis too please?

@Danktuary
Copy link
Owner

Hey! I've tried adding markdown parsing before but it's more of a pain than I hoped. 😞
Passing the entire <discord-message> component's default slot content through a markdown parser isn't as simple as it seemed, due to stuff like this:

<discord-message>
    Welcome, <mention>User</mention>!
    <discord-embed><!-- More embed components here --></discord-embed>
</discord-message>

It gets complex and weird and I haven't found an easy way to handle it. If you or anyone else reading this knows of a way, PRs are very welcome. 👀 👍

@Danktuary Danktuary added the help wanted Extra attention is needed label Aug 3, 2019
@Gaeta
Copy link

Gaeta commented Apr 8, 2021

Wish there was an update on this. You could use v-html

@Danktuary
Copy link
Owner

I have a solution in the works. 😄 Unsure when I'll get around to publishing it, but it'll be sooner rather than later.

@Gaeta
Copy link

Gaeta commented Apr 8, 2021

I made a kinda edit of it but im not sure how safe it is as im using v-html etc. Would also like to see codeblock.

@Danktuary
Copy link
Owner

Hi @Gaeta! In case you're interested in using a Vue 3 version with more components (markdown included), I've made another package you can find here:
https://github.com/Danktuary/discord-message-components
https://discord-message-components.netlify.app/

If you're interested in the DiscordMarkdown component, here's the file for it: https://github.com/Danktuary/discord-message-components/blob/main/packages/vue/src/components/DiscordMarkdown.vue

This package most likely won't be updated anymore; the package I linked will eventually be made to work with Vue 2 and 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants