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

XF 1.3 Highlight Text BB Code

Discussion in 'Styling and Customization Questions' started by BizBuzz, Sep 9, 2014.

  1. BizBuzz

    BizBuzz Member


    I finally took the plunge over the weekend, and purchased Xenforo. Been having fun with the set up, and this support forum is invaluable.

    I am pretty good with finding answer, but have been stumped for more than a few hours with this one.

    I am trying to find a way to just add highlighting (I guess another term is BG?) to BB Codes. I have visited this thread, and I tried to follow the directions, and I can't make it work, and don't know what I am doing wrong.

    I have also been to the Custom BB Code Manager and just feel that is too much for me because all I really want to add is a Highlight Text BB Code.

    Am I just whistling Dixie?

    Can this simple thing be done in the Custom BB Code > Add New Custom BB Code

    Help? Thanks!
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I use this.



    The class defined is like so:
        padding: 1px 2px;
    I can release it as a resource if it would help?
    maszd and BizBuzz like this.
  3. BizBuzz

    BizBuzz Member

    Well, I know it helped me! I got my highlight!!!

    Thank you so much!!!

    My question to you is this: in the second image in the area Editor Icon URL, I used exactly what you put there. I don't want to steal anyone's bandwidth. Is that something I can leave there or is it something I need to upload to my server?

    Again, thanks.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Change that to your style path.
    The editor icon file is already on your server, in the default style and each additional style you use.
    BizBuzz likes this.
  5. BizBuzz

    BizBuzz Member

    Duh, I should have known that. Again, thanks.
  6. BizBuzz

    BizBuzz Member

    Hello again ... the highlighting is working just fine, however, I seem to be limited to certain colors. I have tried some Hex codes (because the default green and blue are way too dark) and they don't seem to work. I am wondering if the code above is something I need to add to get that to work?

    If so, I am so sorry, but where do I put that? Thanks so much!
  7. Brogan

    Brogan XenForo Moderator Staff Member

    You enter the background colour in the tag - see the example usage in the first screenshot.
  8. cclaerhout

    cclaerhout Well-Known Member

  9. oman

    oman Well-Known Member

  10. cclaerhout

    cclaerhout Well-Known Member

    Yes, an editor is "just" an interface and Bb Codes are managed by the XenForo parser and formaters. But the TinyMCE quattro has its own "highlight" Bb Code: "bcolor". Any other Bb Codes can be used as well but won't have the wysiwyg interface.
    oman likes this.
  11. oman

    oman Well-Known Member

    Makes sense. :) Thanks for the info.
    cclaerhout likes this.
  12. BizBuzz

    BizBuzz Member

    Thank you @Brogan

    Also, thanks to @cclaerhout for the option of a new editor and @oman for asking the questions I would have asked.
  13. JamesBrown

    JamesBrown Well-Known Member

    Any chance of an idiots guide to adding background colour function to the standard editor. I've tried to follow Brogan's example, but it assumes I'm not an idiot. Where do I define classes and choose colours etc.


Share This Page