Welcome Guest, Not a member yet? Register   Sign In
want BBCode library ??
#1

[eluser]Le Bang[/eluser]
I want a library BBcode high-light for programming languages : PHP, C++, Java..ect...

Exam:

PHP Code:
<?
    echo 
"hello";
?&
gt


Please help me.
#2

[eluser]xwero[/eluser]
Most BBcode parsers use search and replace so you have to identify the code blocks and let the content be parsed by a syntax highlighter library like geshi
#3

[eluser]sankai[/eluser]
if you use the jquery,maybe you can try the js library

http://markitup.jaysalvat.com/examples/bbcode/
#4

[eluser]xwero[/eluser]
sankai markitup is not a parser but an editor. What it does is providing a standard way to input content. By clicking on the bold icon the specific mark up of the defined mark up language is added. That is why the plugin was made. With one change in the settings you can make all the editors insert another mark up language. The parsing and converting is done somewhere else.
#5

[eluser]Phil Sturgeon[/eluser]
Dredging this one up. Really want code highlighting on my blog, but cant think of the best way. Should I use [|code syntax="php"], run a preg_match and str_replace the strings after running them through geshi?

Seems like a very intensive bit of code to run on my poor CMS. Perhaps I should be storing original text and output text as two separate fields in the db?
#6

[eluser]xwero[/eluser]
You can also go the javascript way and if you already use jquery on your site you can try chili




Theme © iAndrew 2016 - Forum software by © MyBB