Jump to content

BBCode CODE Box


Guest Jaggi

Recommended Posts

Posted

when we post code on the forum its usually because we want to avoid ipb's parser but mostly because it actually has code inside it. Usually we'd refer to a part of that code and i thought a simple but good addition would be to have line numbers for code inside code boxes as it'd make things much more efficient and its a easy implementation. I know people saying that oh "what if i wanna copy code" well i'd suggest having the line numbers and code in separate divs so you can copy the code without getting the line numbers.

Posted

As you mentioned the problem is with copying and pasting code. If you want to add line numbers, why not just add them yourself? Like this?

1 <?php
2 print "my useless code";
3 ?>

Posted

of course it matters. You have one div with the numbers in it set to float left. then another div with the code set to float right. dunno if theres a better way but this works and you can just copy the code without having to worry about line numbers. from left to right or right to left, whatever suits ya.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...