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

Allow using vue components #4

Open
gotenxds opened this issue Jun 2, 2020 · 2 comments
Open

Allow using vue components #4

gotenxds opened this issue Jun 2, 2020 · 2 comments

Comments

@gotenxds
Copy link

gotenxds commented Jun 2, 2020

Hello I'm looking for a way to render md data from my database on the fly, I have some complex data and having the ability to use vue components in the markdown like in nuxt-content would be great, is there any way of achieving that

@atinux
Copy link
Member

atinux commented Oct 1, 2020

Hi @gotenxds

Is this issue for markdownit module?

If so, could you show an example of what you are trying to achieve?

@gotenxds
Copy link
Author

gotenxds commented Oct 1, 2020

Hi @atinux This was originally opened for markdown-it, I've sinced moved on to @nuxt/markdown

The idea is to use vue components in markdown much like in nuxt/content but render it in runtime where the data is unknown.

In my use case there are a lot of small text snippets (10-100 lines of text at most) formated using markdown and stored in the DB as a plain string.

The idea would be to fetch this string and display it using md.toMarkup(data) while having the ability to include vue components in the markdown for added functionality, that is for example, call functions or events, veutify components and so on.

In my experiments, I managed to do this to a point using the vue compiler and registering specific components (as auto-detection is not possible here)

@pi0 pi0 transferred this issue from nuxt-community/legacy-modules Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants