The extra <span> allows manipulating the scroll position (for example when there’s a fixed navigation, this avoids that the headline is hidden behind it)
The <a> should be visible on hover and display a #, link icon or anchor icon (depending on the theme)
This might need to have an additional hook which gets called in renderInline()
Write a plugin that adds IDs and anchors to headings.
Example
Input:
Output:
Background
<span>
allows manipulating the scroll position (for example when there’s a fixed navigation, this avoids that the headline is hidden behind it)<a>
should be visible on hover and display a#
, link icon or anchor icon (depending on the theme)renderInline()