mga bro, naa bai existing JS library nga mo format og codes into HTML nga ang result is something like this?. http://my.execpc.com/~gopalan/dotnet/reflection.html
mga bro, naa bai existing JS library nga mo format og codes into HTML nga ang result is something like this?. http://my.execpc.com/~gopalan/dotnet/reflection.html
Wala ko kakuha sa idea maybe you should try using XML and XSLT in html format.
sorry.. ako pasabot something like this...
but with all the wonderful colors like what i showed in the sample link
ganahan ta ko og JS ra para clientside ra ang processing og parsing sa text. hehehe. nya gamit lang siya DOM para updateCode:class ImplementationOne : IBase { string remark = "Remark of ImplementationOne"; static int DELTAFACTOR = 10; ImplementationOne () { Console.WriteLine ("Invoking ImplementationOne..."); } public string execute (string data) { remark = data; Console.WriteLine ("ImplementationOne's execute() remark is : {0}", remark); return remark; } public double compute (int param1, double param2) { Console.WriteLine ("ImplementationOne's compute() method invoked..."); return param1*param2*DELTAFACTOR; } }
Sorry, I can't help because it is a html.
Try kuno i view source or firebug or something.
Sorry, I don't really get what you really need.
You wanted to use Javascript to re-format the hmtl? change into different colors?
DOM updates or tag changes is possible with JS. Just replace ".innerHTML" property of the DOM tag to change its content.
You can also use CSS tags to change colors or layout dynamically.
ermm... let me try again hehehe..
for example... on a post(entry) theres a tag... lets call that tag
<pre id="code">// some codes here..</pre>
inside the <pre> tag the JS parser will format the "codes" into rich format. with all the tabs which will output something like this..
im just asking if theres an existing parser/formatter. that could translate JS, PHP, and HTML.... it could be on javascript or in any language..
ask lang ko kai dako dako jud ni nga code kong ako pai mag himo.
i dont see how XSLT could do this.
sorry if libog wa gud ko kabaw onsa right term tawag ani nila.
The codes inside <pre> </pre> cannot accept tags. You can't change colors but you could reformat the JS code.
But you could simulate a <pre> with a <div> with a fixed-width font. Then you should escape valid html tags inside.
I don't know any program as of now to do it. Only html/js reformatters.
I don't know if this is a correct library which is tidy(http://tidy.sourceforge.net/). This library can also convert you're HTML to XML. So dali ra pag-parse using XPATH and XSLT.
Similar Threads |
|