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 add attribute for the <a> #103

Closed
Hxuhao233 opened this issue May 18, 2017 · 2 comments
Closed

how to add attribute for the <a> #103

Hxuhao233 opened this issue May 18, 2017 · 2 comments

Comments

@Hxuhao233
Copy link

My Project has used the PegDown to transfer markdown text to html text.In the PegDown ,
I use a custom class extends[LinkRenderer] (https://github.com/sirthias/pegdown/blob/master/src/main/java/org/pegdown/LinkRenderer.java) and override the render() methods to achieve the aim to add some attribute for different links(likes image link common link);
So how can i do it by flexmark?

@vsch
Copy link
Owner

vsch commented May 18, 2017

Please take a look at the samples provided for attributes: AttributeProviderSample and AttributeProviderSample2

If you need to change the URL of a link then you need a LinkResolver and the sample for it: PegdownCustomLinkResolverOptions

@Hxuhao233
Copy link
Author

I have solved it.Thank a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants