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

How to configure additional uses/modules? #42

Open
iparker opened this issue Oct 8, 2021 · 2 comments
Open

How to configure additional uses/modules? #42

iparker opened this issue Oct 8, 2021 · 2 comments

Comments

@iparker
Copy link

iparker commented Oct 8, 2021

Hello,

I want to use https://www.npmjs.com/package/@gerhobbelt/markdown-it-attrs to set target for links in markdown.

But I don't know how to define the allowedAttributes for markdown-it-attrs.

Is this also possible via nuxt.config?

Thanks for some help!

Best regards,

Timo

@katerlouis
Copy link

Also wondering :O

@heroheman
Copy link

heroheman commented Dec 11, 2021

@iparker @katerlouis

md.use(markdownItAttrs, {
  // optional, these are default options
  leftDelimiter: '{',
  rightDelimiter: '}',
  allowedAttributes: []  // empty array = all attributes are allowed
});

should look like this in your nuxt config :

use: [
  'markdown-it-another-plugin',
  [
     'markdown-it-attrs',
     {
         leftDelimiter: '{',
         rightDelimiter: '}',

         ... more options...
     } 
  ]
]

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

3 participants