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

XF 1.5 Adding Custom BB Code

Discussion in 'Troubleshooting and Problems' started by Dan Allen, Jun 30, 2016.

  1. Dan Allen

    Dan Allen Active Member

    I don't see where the ID needs to be entered when adding a new Custom BB Code.


  2. Chris D

    Chris D XenForo Developer Staff Member

    The ID is the BB code tag. Enter sup on its own (without the brackets).
  3. Dan Allen

    Dan Allen Active Member

    Thank you, that helped. I got this to save, but it is not working.


    Page source. The message stops with the <sup>
    <div class="messageContent">
    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">
    just a test<br />
    <div class="messageTextEndMarker">&nbsp;</div>
  4. Mike

    Mike XenForo Developer Staff Member

    You HTML replacement needs to be the HTML that you're replacing the contents of the tag with. In this case, probably:
  5. Dan Allen

    Dan Allen Active Member

    Thank you, the custom bbcode now is behaving the way I need it. There is a complication for enabling superscript text that might be worth having in these notes.

    Once the substitution was fixed, the display of superscript <sup> was not in accord with normal css.
    It was like this in the Xenforo BBCode help.

    This is the page source for that help display showing the <sup> tag substituted for [sup]:

    Disabling CSS shows superscript displayed in html default position

    This is the CSS governing the vertical alignment of <sup>
    in the default xenforo style.
    That rule is in the template xenforo_reset.css.

    Adding this to EXTRA.css got the result I was looking for:


    Attached Files:

    Foxtrek_64 likes this.
  6. This was very helpful in creating a custom bb code for paragraphs, but there really needs to be a tutorial on what to put in the boxes for creating custom bb code so that it's easy to find the information.

Share This Page