SynHi filter

Filters ::: filter_synhi
Maintained by Gareth J BarnardGareth J Barnard
Syntax highlights 'code' or 'pre' then 'code' tags with either EnlighterJS or SyntaxHighlighter. Either can be chosen by the administrator with a choice of styles. Before deciding a 'preview' is shown.
Latest release:
142 sites
8 fans
Current versions available: 2

A syntax highlighter filter with the choice of either EnlighterJS ( - Mozilla Public License 2.0 (MPL-2.0)) or SyntaxHighlighter ( - MIT licensed).

The administrator has 'preview' settings to see what the look will be on example code before the saving.  When active, content with a 'pre' or 'code' tag within a course, module or block will be highlighted.  Specifically between the Course and Block contexts -


Screenshot #0
Screenshot #1
Screenshot #2


Gareth J Barnard
Gareth J Barnard (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Thu, Sep 3, 2020, 1:01 AM
    Approval issue created: CONTRIB-8229
  • Wed, Dec 9, 2020, 11:03 PM
    This is a great filter, thanks a lot! I hope you don't mind me making some small suggestions:
    1) Could you maybe increase the font size for the style "Enlighter"?
    2) The filter places a `` tag around MathJax elements surrounded by `$$`. Could this maybe be rectified?
    3) Could maybe the "<" and ">" symbols be automatically replaced as suggested in
  • Gareth J Barnard
    Tue, Dec 15, 2020, 8:33 PM
    Thanks Florian, noted.
Please login to post comments