3 Posts
attari
7 years ago
4
Topic

Hi,

I am new to this forum. i working on a website which is community website. i completed the custom form but i am getting problem in front end content display. there is 1 field which will take the code from user and i want to display this code in highlighted format "syntax highlighting". any body have experience of this ?

Get a VIP membership
4229 Posts
Kadministrator
7 years ago
1
Level 1

Joomla has builtin CodeMIrror editor, so you can use Wyswyg field and set it to use codemirror editor.

3 Posts
attari
7 years ago
0
Level 2

Dear i am already using code mirror. their is only problem in content display.

http://maker.pk/dev/8-arduino/16-arduino-uno-r3-3x3-led-grid

please review this link and see the code it's not in proper formatting.

27 Posts
Vio Cassel
7 years ago
0
Level 1

Hi @attari,

I suggest you to use  HighlightJS (recommend) or PrismJS. Add script and style files to your Content Type (I use the Code Pack) and initialize.

For your field use Preformatted Text typo plugin... or try to use the Typography -> HTML -> <pre>*value*</pre>.

3 Posts
attari
7 years ago
0
Level 1

Thanks Mr. Vio Cassel now it's working. thanks.

Get a VIP membership