1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 HTML anchors in post

Discussion in 'Styling and Customization Questions' started by sdev, Apr 29, 2015.

  1. sdev

    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.

    <a href="#anchor">Link Text</a>
    <a name="anchor"></a>
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It's not as simple as creating a bb code in XF due to the base href.

    It requires some backend PHP code to make it work.
  3. sdev

    sdev Member

  4. cclaerhout

    cclaerhout Well-Known Member

    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.
  5. sdev

    sdev Member

    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>
    szymme likes this.

Share This Page