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 customize published output to show links? #16

Open
shapiromatron opened this issue Nov 30, 2023 · 0 comments
Open

How to customize published output to show links? #16

shapiromatron opened this issue Nov 30, 2023 · 0 comments

Comments

@shapiromatron
Copy link

shapiromatron commented Nov 30, 2023

This package works great in the wagtail admin. I may have missed it, but is there a way to customize the rendered output from draftail so that there's a link after each heading that saves the ID for the anchor?

For example, I'd like to insert a link in each header (or span) so that the user would have a clickable link to a section.

<h3 id="my-anchor">My section title<a href="#my-anchor" class="anchor-link"></a></h3>

Right now, I'm adding JS after render to add the links after page render, but that's not ideal.

I'm not sure the code belongs in this package, but is there documentation for how to do it? If you can get me started, I can submit a PR with docs to add. Thanks!

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

1 participant