XF 1.4 HTML anchors in post

sdev

Member
Hi, I want to create simple html anchors inside posts. How can I do that? In vBulletin there was a simple bb-code based plugin.

Like
<a href="#anchor">Link Text</a>
<a name="anchor"></a>
 
hmm, I only need one anchor. So I actually managed to insert <a name="#anchor1"></a> into a post with custom bb code. But it only works in IE, not chrome and firefox, jump to with https://example.com/community/threads/html-anchors-in-post.97329/#anchor1. Do I still need php-code to make it work?
This addon has an anchor Bb Code (works in every editor; Tinymce is not needed unless you want the Wysiwyg interface). To see how it works, check the screenshots of this update.
 
Thanks for the suggestion cclaerhout.

Found another way. If you only need a couple of anchor, add this as custom bb code:
<a href="javascript:;" onclick="document.location.hash='anchor1';">custom test</a>

And in another bb-code
<a name="anchor1"></a>
 
Back
Top Bottom