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

Preventing users from changing fonts/font size/colour?

Discussion in 'XenForo Questions and Support' started by GregF, Jun 21, 2011.

  1. GregF

    GregF Active Member

    Is there any way of adjusting settings to prevent members from changing fonts, font sizes & colours? As they can sometimes be a little too creative, which can make things a bit distracting sometimes...

  2. Brogan

    Brogan XenForo Moderator Staff Member

    There are no settings available which will prevent that.
    I just tried forcing font settings in the Style Properties -> Message Elements -> Message Text but it doesn't work as the styling is applied inline.

    You could likely do it with code modifications to the server files.
  3. Forsaken

    Forsaken Well-Known Member

    .messageList .messageText
    font-family:@messageText.font-family !important;
    font-size:@messageText.size !important;
    color:@body.color !important;

    Would force it to be the defaults all the time.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    I tried that and it didn't work.

    Although I only tried it in Style Properties and EXTRA.css, not by editing the css template directly.
  5. Digital Doctor

    Digital Doctor Well-Known Member

    I wonder if this would require modifications to the TinyMCE editor itself ?
  6. Forsaken

    Forsaken Well-Known Member

    .messageList .messageText span
    font-family:@messageText.font-family !important;
    font-size:@messageText.font-size !important;
    color:@body.color !important;
    If you remove any of the declarations, you can allow them to change whichever they want. It basically just replaces the <span> inline style that BBCode produces.
  7. DroidHost

    DroidHost Well-Known Member

    I think you can do something here

    I dont know

  8. Phillip

    Phillip Active Member

    If anyone finds a workaround for this please let us know. Easy to follow instructions would be very helpful.
  9. GregF

    GregF Active Member

  10. Digital Doctor

    Digital Doctor Well-Known Member

    Wordpress uses TinyMCE.
    Here is an article about customizing the TinyMCE Text editor in Wordpress.
    I don't know if that provides any further clues ?
    I guess Xenforo would be considered a Third Party Plugin of TinyMCE ? non ?
    There is a forum for that:
    Third party plugins
    Tips, Tricks & HowTo's
    I see some TinyMCE API documentation.

    I think many people would like to know more about tweaking TinyMCE in Xenforo.
  11. dieketzer

    dieketzer Well-Known Member

    ive had an edit posted for ages to remove colour functionality from tinymce.
    one could use that as a guide for disabling font size/face as well. the edits would be similar and would be located in the same files.
    Digital Doctor likes this.
  12. Digital Doctor

    Digital Doctor Well-Known Member

Share This Page