2

What is Best syntax highlighter for Joomla?

Geshi is not working fine in my site.
How to integrate this style of syntax in Joomla 3 site?

http://alexgorbatchev.com/SyntaxHighlighter/

3 Answers 3

2

Codemirror is included in joomla.

You can use the formfield "editor" and select codemirror with editor="Codemirror". Take a look at https://docs.joomla.org/Editor_form_field_type

2

The Geshi code highlighter was removed from Joomla on or around Joomla 3.3.

There are a few third party extensions in the Joomla Extensions Directory that can enable code highlighting:

"Best" is a little subjective given that you haven't specified any requirements or preferences. I recommend downloading and testing the free ones to see which of these most closely fits your requirements. If none of the free options are sufficient, then you may need to investigate the paid options.

1

For Joomla!3 and 4 you can use the editor-builtin function to get syntax highlighting in backend.

For syntax highlighting in frontend just install and enable this plugin: https://extensions.joomla.org/extension/prism-syntax-highlighter-for-joomla/

It loads the needed files to use the syntax highlighting also in the frontend. It supports significantly more programming languages than the editor offers, see manual: https://www.andrehotzler.de/en/projects/prism-prismjs-com-syntaxhighlighter-for-joomla.html

(The mentioned plugin for Joomla! was written by me, but not the syntax highlighter "PrismJS" used in the plugin)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.