File Contents Highlighted

icon.pngEver had the need to present your lines of code in a teasing fashion? Have a look at this add-on.

For different purposes concrete5 brings a JavaScript based editor for different languages called ace editor. This powerful editor is very useful to comfortably display of your own code examples, too. Some of the editor's features: syntax highlighting for over 110 languages, automatic indent and outdent...

installed-en.png

Installation of the Highlight File add-on works as usual. The installed block shows in the composer Blocks/Basics section.

file-1-en.png

 

Add a Highlight File block at any page position.

 

 

 

 

 

 

 

 

The add/edit dialogue box lets you select a file from the files uploaded to concrete5's file store:

file-2-en.png

A file is selected using concrete5's file manager. All facilities of concrete5's file manager are at your hands (for example upload of a file). Please register any unknown file types utilising concrete5's dialogue at System & Settings » Files » Allowed File Types in advance.

On selection of a file the Highlight File type is detected, if possible. The implementation supports all languages of the ace editor. The default file type txt is anticipated if automatic detection fails.

After saving the selection the file contents are shown highlighted in your page:

file-3-en.png

The grey top line containing the file name is clickable. It closes/opens the file display box. Initially the display box is open and the caret (at right) shows down. On display box closed the caret shows right.

Viewing a Highlight File block on a mobile display (bootstrap xs) the display box initially is closed.

Ever had the need to present your lines of code in a teasing fashion? Have a look at this add-on...
This add-on List of all page versions enhanced displays a list of collection versions including a…
This add-on lets you add social media icons on your pages enabling to branch to different social…
Enhancing the common ZIP image gallery solution a version is implemented for the CMS concrete5.