input= $input; $generator->hl_option['theme']= isset($_POST['theme']) ? $_POST['theme'] : 'bclear'; $generator->hl_option['syntax']= isset($_POST['syntax']) ? $_POST['syntax'] : 'java'; $generator->hl_option['linenumbers']= isset($_POST['line']) ? TRUE : FALSE; $generator->hl_option['line-number-length']= 2; $generator->hl_option['replace-tabs']= 4; $generator->hl_option['reformat']= 'java'; //$generator->hl_option['enclose-pre']= FALSE; $generator->hl_option['encoding']= 'UTF-8'; $result = $generator->getResult(); preg_match_all('/pre style="([^"]+?)font-size([^"]+?)"/',$result,$style); $preStyle = $style[1][0]; $generator->hl_option['enclose-pre']= FALSE; $result = $generator->getResult(); $code = ''; foreach(explode("\n",$result) as $row) { //echo $row . '
'; //echo htmlspecialchars(preg_replace('/([^<][^ ]*)( +?)([^ ]*[^>])/', '$1@$3', $row)) . '
'; //echo preg_replace_callback('/>( *)(.*)( *)'; $row = preg_replace_callback('/( *)(\d{1,3})( *)/','space',$row); $code .= str_replace(' ','  ',$row) . '
'; } //print $result; function space($match) { return str_repeat(' ', strlen($match[1])) . $match[2] . str_repeat(' ',strlen($match[3])); } ?> Syntax highlight for office

Syntax highlight for office

reformat , color , multi lang and theme

How to use
Syntax: theme:



Copy To Clipboard
supported by highlight created by mlwmlw
20020