You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to add the rel="nofollow" attribute to (most of the) rendered links from markdown texts.
I came around #103 and created an extension that handles Link and AutoLink nodes. This works great.
Now, I'd also like to add the rel attribute to anchor elements that are entered as HTML in the markdown input, but I cannot find out which node I need to match or how to match this.
Do you have any pointers? Thank you :)
@Elmervc, markdown does not parse HTML so you need to parse the node text for your tags and render the node in your extension with your changes. In this case the node is an HtmlInline, which will contain a contiguous run of HTML from the markdown.
If you don't have any mods for a particular node you can just let the previous renderer handle it by calling context.delegateRender()
I'd like to add the
rel="nofollow"
attribute to (most of the) rendered links from markdown texts.I came around #103 and created an extension that handles
Link
andAutoLink
nodes. This works great.Now, I'd also like to add the rel attribute to anchor elements that are entered as HTML in the markdown input, but I cannot find out which node I need to match or how to match this.
Do you have any pointers? Thank you :)
The text was updated successfully, but these errors were encountered: