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
Images are inserted as shortcode in the editor: [image src="/assets/image.jpg" id="164" ... ]
The id="164" part is then picked up and shown as on-page linkable anchor in the selector of the anchor-link modal in the CMS. (When selected, an anchor link gets inserted as <a href="[sitetree_link,id=1]#164">...</a>).
But probably a better fix would be to process any shortcodes before filtering through the regex, as the result of shortcodes could theoretically contain linkable anchors as well?
The text was updated successfully, but these errors were encountered:
But probably a better fix would be to process any shortcodes before filtering through the regex, as the result of shortcodes could theoretically contain linkable anchors as well?
Yes, that would definitely be the case in our projects where shortcodes can provide markup that may contain links and anchors, too. At the same time it might be tricky since the content may not be directly visible if one went to check it manually since the WYSIWYG would still just have the shortcode.
Images are inserted as shortcode in the editor:
[image src="/assets/image.jpg" id="164" ... ]
The id="164" part is then picked up and shown as on-page linkable anchor in the selector of the anchor-link modal in the CMS. (When selected, an anchor link gets inserted as
<a href="[sitetree_link,id=1]#164">...</a>
).One option could be to fix the regex itself at
SiteTree::getAnchorsOnPage()
(NOTE: duplicated in Elemental).But probably a better fix would be to process any shortcodes before filtering through the regex, as the result of shortcodes could theoretically contain linkable anchors as well?
The text was updated successfully, but these errors were encountered: