Client side code highlighter. This is ready-to-use Cotonti port of SyntaxHighlighter by Alex Gorbatchev.
Authors:
GitHub: https://github.com/Cotonti-Extensions/syntax-highlighter
Usage with HTML parsing: To highlight source code with some specific language, use HTML tags like this:
<pre class="brush:language;"> Your code here </pre>
The list of available brushes and themes: https://github.com/syntaxhighlighter/syntaxhighlighter/wiki/Brushes-and-Themes
Plugin for CKEditor: https://ckeditor.com/cke4/addon/syntaxhighlight, https://github.com/dbrain/ckeditor-syntaxhighlight
Plugin bundled with a pack of predefined color themes. But you can adjust some of it to suit you needs with Cotonti theme colors. To do that copy theme CSS file from syntaxhighlighter/lib/
folder to your theme sub folder named styles
— themes/theme-name/styles
. File name shoud have prefix syntaxhighlighter-
. For example custom theme file full name can be like this: themes/theme-name/styles/syntaxhighlighter-my-awesome-theme.css
.
Now you can change it for your needs or create your own. All CSS files located in themes/theme-name/styles
folder override default ones with same names.
Default theme:
Cotonti theme:
Thanked: 217 times
Вот там есть такой интересный файл override.css, который грузится из папки с плагином. Конечно для своего сайта каждый захочет свои модификации. Может быть сделать настраиваемый путь загрузки этих стилей? Чтобы не перезаписать при обновлении?
Thanked: 265 times
Сделал его загрузку опциональной. Можно отключить в админке. А сами стили можно определить в теме сайта.