Code Snippets in Topics

Software: Other

Avatar
Alejandro Santander, Administrator
Posted: 18 June 2011 03:10 PM   Total Posts: 414

If you want to include source code in your topics/replies in the forum, I recommend the following for syntax highlighting.

Instead of using the

[code] 

method, try using

<pre class="brush: as3"your code </pre

Supported languages are as3, php, xml, java, jscript, css and cpp.

You should get something like this:

private function myNiceHighlightedAs3Function(myParam:Number):int
{
     
return int(myParam);

Hope it is useful!

   

Avatar
peyvand, Newbie
Posted: 20 June 2011 05:05 AM   Total Posts: 2   [ # 1 ]

ok administrator :D

   

cbrown, Jr. Member
Posted: 24 June 2011 07:29 PM   Total Posts: 39   [ # 2 ]

I don’t like how it removes all returns and tabs and puts everything on one line :(

 Signature 
signature_image

whatever is good to know is difficult to learn

   

Avatar
Alejandro Santander, Administrator
Posted: 24 June 2011 07:30 PM   Total Posts: 414   [ # 3 ]

Oh! It’s completely broken.
Will have a look right away. Thanks for noticing raspberry

   

Avatar
Alejandro Santander, Administrator
Posted: 24 June 2011 08:42 PM   Total Posts: 414   [ # 4 ]

After some research, I’m having trouble implementing a good syntax highlighter in the forum. Expression Engine removes most html tags in forum posts.

For now, I’ve disabled the plugin I was using and reverted to the code /code alternative which displays as in the first post in this topic.

I would like a better syntax highlighting method, so please, if anyone could provide any info it would be very much appreciated.

   
   
‹‹ Welcome

X

Away3D Forum

Member Login

Username

Password

Remember_me



X