Advanced Electron Forum Community

Topic : Google Prettify in bbcode?

Posted By: Patrik356b on January 26, 2014, 2:31 am

I have tried for a while to implement Google Prettify...

Demo links:
Quote  (php/html)  (c++ like syntax)  (dual-file source code)

* These links are not connected to AEF.

Below is a sample script I wrote, but I don't know how to implement it as a mod to AEF.

<LINK HREF="resources/prettify.css" TYPE="text/css" REL="stylesheet" />
<SCRIPT SRC="resources/prettify.js"></SCRIPT>
</HEAD><BODY onload="prettyPrint()">

$code = "here the code would be highlighted with Google Prettify";

echo "<pre class=\"prettyprint linenums:1\"><BR>".htmlspecialchars($code)."</pre>";
<NOSCRIPT>Error: This page requires javascript, which your browser does not support.<BR><BR>It is possible that javascript is disabled in your browser.<BR><BR>Enable it and/or update your browser and this page should work just fine.</NOSCRIPT></BODY></HTML>

How can I implement this, preferably with lets say the tag [src] ?

Thanks in advance.

Edited by Patrik356b : January 26, 2014, 2:31 am

Powered By AEF 1.1.0 Preview © 2007-2011 AEF Group. All rights reserved