karavas / highlight-js
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Type:typo3-cms-extension
Requires
- typo3/cms-core: ^8.7.4
Replaces
- highlight_js: 2.0.0
- typo3-ter/highlight-js: 2.0.0
README
Create a Highlight.js element in TYPO3
For administrators
The extension needs to be installed as any other extension of TYPO3 CMS:
- Switch on the Extensions module
- On the upper left corner select the "Get Extensions" from the select menu
- On the search bar, type: highlight_js
- Click on the cloud icon and download the extension
Preparation: Include static TypoScript
The extension ships some TypoScript code which needs to be included.
- Switch on the Template module
- Go to your root page
- Switch to the Edit the whole template record
- Switch to the Includes tab
- Choose the Highlight.js TypoScript static template
- Save and close your settings
Include PageTS
The extension ships TSConfig too:
- Switch to your root page
- Edit the page
- Switch to Resources
- Include Highlight.js - PageTS
- Save
Apply your own templates
Define on your TypoScript file the path that your templates are located.
tt_content {
highlight_js {
templateRootPaths.500 = EXT:yourExtention/Resources/Private/Templates/
partialRootPaths.500 = EXT:yourExtention/Resources/Private/Partials/
templateName = Highlight.html
}
}
Apply Styles
On the constants editor, you can find a list with the current implemented styles. Select one and see it rendered on the frontend.
For editors
- Switch on the Page module
- Choose the page on the Pagetree that you would like the content element to be placed
- Click on the content button to create a new content element
- Switch to Highlight.js
- Choose your content element
Additional info
Since Highlight.js supports a load of languages, i can not include them all at once so if you want more styles or languages to be included, create an issue in order to get them asap included.
In case you have the TypoScript and FLUID language definitions, please submit them here so i will be able to add them on the extension: