Codeeditor_XH - a CMSimple_XH Plugin

Plugin Icon

Codeeditor_XH provides a replacement for the simple textarea in CMSimple_XH's back-end to edit the template, the stylesheet and the plugin stylesheets. Furthermore it implements the editor interface of CMSimple_XH 1.5.2 (and up), so it can be used to edit the content of the website.

Instead of being a WYSIWYG or WYSIWYM editor, it allows to edit the source code directly, and offers syntax highlighting, line numbering, code indenting and folding, bracket matching, optional line wrapping, filebrowser integration and search and replace.

Please do read this documentation, before you encounter any problems!

Important Notice

The current version of Codeeditor_XH is a release candidate. Use with caution!

Requirements

Codeeditor_XH is a plugin for CMSimple_XH. It requires a UTF-8 encoded version.

Installation

The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details.

  1. Backup the data on your server.
  2. Unzip the distribution on your computer.
  3. Upload the whole directory codeeditor/ to your server into CMSimple_XH's plugin directory.
  4. Set write permissions for the subdirectories config/, css/ and languages/.
  5. Switch to "Plugins"→"Codeeditor" in the back-end to check if all requirements are fulfilled.

Settings

The plugin's configuration is done as with many other CMSimple_XH plugins in the website's back-end. Select "Codeeditor" from "Plugins".

You can change the default settings of Codeeditor_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, or customize them according to your needs.

The style of Codeeditor_XH can be customized under "Stylesheet".

Further configuration can be done in plugins/codeeditor/inits/init.json. The options are explained in CodeMirror's user manual.

Usage

To use Codeeditor_XH as external editor for CMSimple_XH 1.5.2 (and up) go to Settings→CMS→Editor→External and enter "codeeditor".

The editor has no toolbar or context menu, but instead uses keyboard shortcuts, which can be configured in the init file. Some noteworthy ones:

FunctionPCMac
saveCtrl-SCmd-S
findCtrl-FCmd-F
find nextCtrl-GCmd-G
find prevShift-Ctrl-GShift-Cmd-G
replaceShift-Ctrl-FCmd-Alt-F
replace allShift-Ctrl-RShift-Cmd-Alt-F
toggle fullscreenEscEsc
toggle foldingCtrl-QCmd-Q
toggle line wrappingAlt-WAlt-W
toggle previewCrtl-PCtrl-P
browse imagesCtrl-ICmd-I
browse downloadsCtrl-LCmd-L
browse mediaCtrl-MCmd-M
browse userfilesCtrl-UCmd-U

Limitations

The browse functions only support the default filebrowser of CMSimple_XH 1.5.4 (and up).

License

Codeeditor_XH is licensed under GPLv3.

© 2011-2013 Christoph M. Becker

Czech translation © 2012 Josef NÄ›mec
Slovak translation © 2012 Dr. Martin Sereday

Credits

Codeeditor_XH is powered by CodeMirror. Many thanks to Marijn Haverbeke for developing this great piece of software and releasing it under MIT license.

The plugin icon was taken from the Oxygen icon set. Many thanks for offering these icons under GPL.

This plugin uses free applications icons from Aha-Soft. Many thanks for making these icons freely available.

Many thanks to the community at the CMSimple forum for tips, suggestions and testing. Particularly I want to thank Gert, who contributed the ge theme.

And last but not least many thanks to Peter Harteg, the "father" of CMSimple, and all developers of CMSimple_XH without whom this amazing CMS wouldn't exist.