Skip to content

How to customize published output to show links? #16

@shapiromatron

Description

@shapiromatron

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions