Loading...
 
Features / Usability

Features / Usability


How to add or use Code Syntax Highlighting

posts: 2 Sweden

Hi Everyone,

I am currently using TikiWiki version 12.4. As I am currently working on creating my own reference library of various programing languages code syntax I would like to be able to use a code syntax highlighting function in order to display various code syntax.

Note: I am doing this using the TikiWiki - Wiki function (Create new wikipage using wyziwyg).

So far I have been unable to find a built in function to do this and I wonder if there is a standard
built in function for this? (If so how do I use it)?

Or if I need to somehow install a plugin or function to add this functionality to tikiwiki.
If so, then how do I do that?

Thank you so much for your help.


posts: 2 Sweden

I found a solution to this.

How To Enable Code Syntax Highlighting in TikiWiki 12.4

You find the option of enable/disable Code Syntax Highlighting (CodeMirror) here:

Admin Home > Editing & plugins

Click the checkbox where it says -> Syntax Highlighter (CodeMirror)

Congratulations! You have now enabled Code Syntax Highlighting in TikiWiki.


How To Add an Icon for Code Syntax Highlighting in the Wyziwyg Editor in TikiWiki 12.4

This will make it a lot easier to highlight code syntax in TikiWiki.

Log into your TikiWiki site as Admin. 

In the usermenu (by default it appears to the left) goto

Admin > Toolbars >

Here select the viewmode where you want to add the button.  I added it to Wiki and WYZIWYG.

When you have selected the viewmode that you scroll down in the
Plugin Tools list

You should now see a listing that is called Code.

Drag-and-Drop it where you want it to appear on the toolbars above.

Click SAVE.

Congratulations! You have now added the Cody Syntax Highlighter icon to your editor.


When you want to highlight code simply click this icon. It will open up a graphical interface
where you can select what programming language you are using and additional settings that control how the Syntax Highlighting snippet appears.


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting