Foros de discusión

Code Syntax Highligher / Code Formatting in posts

thumbnail
Tariq Ahmed, modificado hace 13 años.

Code Syntax Highligher / Code Formatting in posts

New Member Mensajes: 7 Fecha de incorporación: 2/04/11 Mensajes recientes
Hi there. Is there a plug-in out there that adds in code syntax highlighting. I didn't see it under the official gallery, but thinking there might be a third party one out there? E.g.:

http://alexgorbatchev.com/SyntaxHighlighter/

Thx.
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Code Syntax Highligher / Code Formatting in posts

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Hi there. Is there a plug-in out there that adds in code syntax highlighting. I didn't see it under the official gallery, but thinking there might be a third party one out there?


Do you mean an addition to the current CKEditor used in Web Content portlet and Blog portlet? Or a portlet to display javascript codes with syntax highlighted?

If the former, it may be better to ask the CKEditor project.
thumbnail
Tariq Ahmed, modificado hace 13 años.

RE: Code Syntax Highligher / Code Formatting in posts

New Member Mensajes: 7 Fecha de incorporación: 2/04/11 Mensajes recientes
Not in the editor, but so that code snippets when displayed in a Blog or Web Content portlet are colorized/formatted.

E.g. are here two blog posting examples that use a code syntax highlighter to format/colorize code snippets similar to how they'd be presented within an IDE:

http://www.bennadel.com/blog/2161-Exploring-ColdFusion-9-Implicit-Synthesized-Getter-And-Setter-Behavior.htm

http://www.coldfusionjedi.com/index.cfm/2011/4/4/ColdFusion-Quickie-Finding-all-the-credit-card-numbers-in-a-string

They all use third party plugins in the form of JavaScript and CSS to accomplish it, and they're generally triggered off the JavaScript function detecting a certain tag. E.g.


[sql]
SELECT * FROM BLAH...
[/sql]

Would then format it using the SQL syntax highlighter.
Tomi Savolainen, modificado hace 11 años.

RE: Code Syntax Highligher / Code Formatting in posts

New Member Mensajes: 6 Fecha de incorporación: 13/10/08 Mensajes recientes
I would like to see something similar as well.
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: Code Syntax Highligher / Code Formatting in posts

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Sorry but I haven't seen any.