Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmb69/syntaxhighlighter_xh
Syntaxhighlighting for CMSimple_XH
https://github.com/cmb69/syntaxhighlighter_xh
cmsimple-xh syntax-highlighting
Last synced: 11 days ago
JSON representation
Syntaxhighlighting for CMSimple_XH
- Host: GitHub
- URL: https://github.com/cmb69/syntaxhighlighter_xh
- Owner: cmb69
- License: gpl-3.0
- Created: 2014-12-06T02:32:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-02-10T14:36:43.000Z (almost 2 years ago)
- Last Synced: 2024-11-01T04:42:20.405Z (about 2 months ago)
- Topics: cmsimple-xh, syntax-highlighting
- Language: CSS
- Homepage:
- Size: 407 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Syntaxhighlighter_XH
Syntaxhighligher_XH facilitates improved presentation of code snippets in
the content, for visitors having JavaScript enabled. The actual work is done by
[Alex Gorbatchev’s Syntaxhighlighter](https://github.com/syntaxhighlighter/syntaxhighlighter);
Syntaxhighlighter_XH merely is meant to simplify
the integration in CMSimple_XH. For some content editors, plugins are
available which make editing even more convenient.- [Requirements](#requirements)
- [Download](#download)
- [Installation](#installation)
- [TinyMCE4](#tinymce4)
- [TinyMCE5](#tinymce5)
- [CKEditor](#ckeditor)
- [Settings](#settings)
- [Usage](#usage)
- [Limitations](#limitations)
- [Troubleshooting](#troubleshooting)
- [License](#license)
- [Credits](#credits)## Requirements
Syntaxhighligher_XH is a plugin for CMSimple_XH.
It requires CMSimple_XH ≥ 1.7.0, and PHP ≥ 7.1.0 with the *json* extension.## Download
The [lastest release](https://github.com/cmb69/syntaxhighlighter_xh/releases/latest)
is available for download on Github.## Installation
The installation is done as with many other CMSimple_XH plugins. See the
[CMSimple_XH Wiki](https://wiki.cmsimple-xh.org/?for-users/working-with-the-cms/plugins)
for further details.1. **Backup the data on your server.**
1. Unzip the distribution on your computer.
1. Upload the whole directory `syntaxhighlighter/` to your server into
into the `plugins/` directory of CMSimple_XH.
1. Set write permissions to the subdirectories `config/`, `css/` and
`languages/`.
1. Navigate to `Plugins` → `Syntaxhighlighter` in the back-end
to check if all requirements are fulfilled.For an improved user experience in the editors, you *may* need to do some
additional setup. This is not necessary for recent versions of TinyMCE4
and TinyMCE5.### TinyMCE4
1. Add the following line to `external_plugins`:
"syntaxhl": "%CMSIMPLE_ROOT%plugins/syntaxhighlighter/editors/tinymce4/syntaxhl/plugin.min.js"
1. Add the `syntaxhl` button to `toolbarN` wherever you prefer.
### TinyMCE5
1. Add the following line to `external_plugins`:
"syntaxhl": "%CMSIMPLE_ROOT%plugins/syntaxhighlighter/editors/tinymce5/syntaxhl/plugin.min.js"
1. Add the `syntaxhl` button to `toolbar` wherever you prefer.
### CKEditor
1. Copy `plugins/syntaxhighlighter/editors/ckeditor/syntaxhighlight/` to
`plugins/ckeditor/plugins_external/`.## Settings
The configuration of the plugin is done as with many other CMSimple_XH plugins in
the back-end of the Website. Select `Plugins` → `Syntaxhighlighter`.You can change the default settings of Syntaxhighlighter_XH under
`Config`. Hints for the options will be displayed when hovering over
the help icons with your mouse.Localization is done under `Language`. You can translate the character
strings to your own language if there is no appropriate language file
available, or customize them according to your needs.The look of Syntaxhighlighter_XH can be customized under `Stylesheet`.
## Usage
Add code snippets you like to be presented with syntax highlighting to your pages by
enclosing it in a `` element with a class as described in
[the manual of Syntaxhighlighter](https://github.com/syntaxhighlighter/syntaxhighlighter/wiki/Configuration)For TinyMCE 4 and 5 inserting and editing the code snippets can be done by pressing the
`Insert/Edit code sample` button, where you can edit the code snippets and
choose the desired language. Other settings have to be done manually in the
HTML source code view.For CKEditor inserting and editing the code snippets can be done by pressing the
`Add or update a code snippet` button, where you can edit the code snippets and
the settings.## Limitations
The syntax highlighting, line numbering etc. requires a contemporary browser
(e.g. IE is not supported) with JavaScript enabled. In other environments the code
snippets are presented unenhanced.## Troubleshooting
Report bugs and ask for support either on
[Github](https://github.com/cmb69/syntaxhighlighter_xh/issues)
or in the [CMSimple_XH Forum](https://cmsimpleforum.com/).## License
Syntaxhighlighter_XH is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.Syntaxhighlighter_XH is distributed in the hope that it will be useful,
but *without any warranty*; without even the implied warranty of
*merchantibility* or *fitness for a particular purpose*. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with Syntaxhighlighter_XH. If not, see .Copyright 2012-2023 Christoph M. Becker
## Credits
This plugin was inspired by *pmolik*.
Syntaxhighlighter_XH is powered by
[Alex Gorbatchev’s Syntaxhighlighter](https://github.com/syntaxhighlighter/syntaxhighlighter);
many thanks for releasing this great tool under LGPL.The TinyMCE 4 and 5 plugins are based on the
[codesample plugin](https://www.tinymce.com/docs/plugins/codesample/) by Ephox Corp.
The [CKEditor plugin](https://github.com/dbrain/ckeditor-syntaxhighlight)
is written by Daniel Brain.
Many thanks for releasing these plugins under LGPL.The plugin logo has been designed by [YellowIcon](https://www.everaldo.com/about).
Many thanks for publishing this icon under GPL.Many thanks to the community at the [CMSimple_XH-Forum](https://www.cmsimpleforum.com/)
for tips, suggestions and testing.And last but not least many thanks to [Peter Harteg](httsp://www.harteg.dk),
the “father” of CMSimple,
and all developers of [CMSimple\_XH](https://www.cmsimple-xh.org)
without whom this amazing CMS would not exist.