ehaerer / rte-ckeditor-codesnippet
Integrates the CKEditor codesnippet plugin
Installs: 394
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Type:typo3-cms-extension
Requires
- php: >=7.2.0
- typo3/cms-core: ^9.5 || ^10.4 || ^11.5
- typo3/cms-rte-ckeditor: ^9.5 || ^10.4 || ^11.5
Suggests
Replaces
- typo3-ter/rte-ckeditor-codesnippet: 1.0.1
README
This extension ships a simple plugin for the CkEditor to allow editors to insert coding tags inside text elements. The plugin itself has been taken from the CKEditor Inserting Code Snippet documentation without any changes.
At the moment it integrates the plugin version 4.18.0.
It suggests the extension fs_code_snippet to render the codesnippets in the frontend of your website.
Short overview:
Installation
Use composer require ehaerer/rte-ckeditor-codesnippet
or download the extension from TER.
The extension requires the extension fs_code_snippet from TER or via Composer it will be required and installed automatically. fs_code_snippet is used to render the output in the frontend.
Usage
All it takes to enable the plugin are the following changes in your e.g. RTE.yaml
with including the needed TsConfig and optional including the TypoScript configuration of fs_code_snippet:
- Import the configuration from the extension in your RTE configuration:
imports: - { resource: "EXT:rte_ckeditor_codesnippet/Configuration/RTE/Plugin.yaml" }
- Enable the plugin in your RTE configuration:
editor: config: extraPlugins: - codesnippet
- Optional: include TypoScript constants and setup from fs_code_snippet in the configuration of your site package to render the code block in your website (frontend):
# constants
@import 'EXT:fs_code_snippet/Configuration/TypoScript/constants.txt'
# setup
@import 'EXT:fs_code_snippet/Configuration/TypoScript/setup.txt'
- Check the results in the backend editor and in the frontend of your website.