SynHi filter

Filters ::: filter_synhi
Maintained by Gareth J BarnardGareth J Barnard
Syntax highlights 'code' or 'pre' 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:
78 sites
60 downloads
8 fans
Current versions available: 1

A syntax highlighter filter with the choice of either EnlighterJS (https://github.com/EnlighterJS/EnlighterJS - Mozilla Public License 2.0 (MPL-2.0)) or SyntaxHighlighter (https://github.com/syntaxhighlighter/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 - https://docs.moodle.org/39/en/Context.


Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

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 https://stackoverflow.com/a/5406725/7875049?
  • Gareth J Barnard
    Tue, Dec 15, 2020, 8:33 PM
    Thanks Florian, noted.
Please login to post comments