In the HTML editor, you can select the code text, then select from the "Styles" drop-down the style "Computer Code", and on the "Normal" drop-down the formatting "Formatted". This puts the code in <pre> and <code> tags, so you don't have to manipulate HTML directly.
Daniel Sajdyk wrote: |
Looks like it works :)
Code need to be put in tags:
<pre><code class="sql">...</code></pre>
but it works.
Thank you :D
Best Regards
Daniel Sajdyk
Stefan Ritt wrote: |
I did not know about highlight.js . You can put it into any elog page with "Bottom text = ...". I tried it for this forum and put in some C code:
#include <stdio.h>
int main()
{
// printf() displays the string inside quotation
printf("C Programming");
return 0;
}
Seems like this works nicely. Thanks for that hint.
Daniel Sajdyk wrote: |
I thought so.
One more question :) I want manually add that parser (https://highlightjs.org), but I'm newby in that and don't know where ....
I know that downloaded hightlight pack I must put into folder scripts, but where to add this line:
<script>hljs.initHighlightingOnLoad();</script>
Stefan Ritt wrote: |
You can manually highlight code, but there is no automatic language parser.
Daniel Sajdyk wrote: |
Hello :)
Is there any way to highlight code (for example php, SQL) in elogs entries?
Best Regards
Daniel Sajdyk
|
|
|
|
|
|