Welcome to Our Community

Registration on our forums are now open for some days! Feel free to sign up today.

Unmaintained disable text colour-formatting in editor 1.1.2

remove chromes pasting of colours into the tinymce editor

  1. XenForo Rocks
    Compatible XF Versions:
    • 1.0
    • 1.1
    • 1.2
    xf 1.0 - 1.1.2

    due to chrome pasting issues (pasting colour-formatted text), and the fact that i have both a light and dark style available, text colour formatting is problematic. as a result i have elected to completely disable all colour functionality from tinyMCE.
    • pasted colour-formatting will be stripped when posted
    • colour-format button will not be visible
    • manually entered [color] tags will silently fail
    • code colour-formatting is unaffected (syntax highlighting)
    • the effect is not retroactive
    unfortunately this requires several code modifications to the php files. i have made the necessary edits and included them in the attached zip.
    to install, unzip and upload.
    to revert, upload the original files from your xenforo install zip.

    files affected:
    /library/XenForo/Html/Renderer/BbCode.php
    /library/XenForo/BbCode/Formatter/Base.php
    /js/tinymce/themes/xenforo/editor_template.js