https://github.com/backdrop-contrib/tinymce_codehighlight
Backdrop CMS tweaks for the TinyMCE codesample plugin, adds syntax highlighting on content display
https://github.com/backdrop-contrib/tinymce_codehighlight
backdropcms codehighlighting tinymce
Last synced: 11 months ago
JSON representation
Backdrop CMS tweaks for the TinyMCE codesample plugin, adds syntax highlighting on content display
- Host: GitHub
- URL: https://github.com/backdrop-contrib/tinymce_codehighlight
- Owner: backdrop-contrib
- License: gpl-2.0
- Created: 2025-02-15T12:27:50.000Z (12 months ago)
- Default Branch: 1.x-1.x
- Last Pushed: 2025-02-15T13:23:38.000Z (12 months ago)
- Last Synced: 2025-02-15T13:34:03.369Z (12 months ago)
- Topics: backdropcms, codehighlighting, tinymce
- Language: JavaScript
- Homepage:
- Size: 781 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# TinyMCE Code Highlight
TinyMCE's codesample plugin `{;}` already uses Prism.js to add syntax
highlighting to its code snippets, but in a limited way.
This module enhances these capabilities.
- Adds an admin form to configure theme, copy button and languages available
in the editor dropdown
- Adds support for all 297 programming languages supported by Prism.js (not only
a subset)
- Uses Prism.js also when *displaying content* (not only inside the editor)
- Adds three themes that play nicely with both, the editor and Backdrop CMS
- Provides the API to quickly add your own custom theme with little effort

## Installation
- Install this module using the official [Backdrop CMS instructions](https://docs.backdropcms.org/documentation/extend-with-modules)
- Go to admin/config/content/tinymce-codehighlight and tweak as needed
- If not already done, edit your custom editor profile to add the codesample
button `{;}` (on admin/config/content/tinymce-builder)
## Dependencies
- TinyMCE
Note that code highlighting will work for any compatible markup, also if
created with CKEditor5 or manually.
## Issues
Bugs and feature requests should be reported in the [Issue Queue](https://github.com/backdrop-contrib/tinymce_codehighlight/issues)
## Current Maintainers
- [Indigoxela](https://github.com/indigoxela)
## Credits
Bundles [Prism.js](https://prismjs.com/), an easy to use, lightweight
JavaScript library to add syntax highlighting for a variety of programming
languages. Prism.js is licensed under MIT and maintained on GitHub.
## License
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.