Results 1 to 8 of 8
  1. #1

    Default html Code formatter


    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

  2. #2

    Default Re: html Code formatter

    Wala ko kakuha sa idea maybe you should try using XML and XSLT in html format.

  3. #3

    Default Re: html Code formatter

    sorry.. ako pasabot something like this...
    but with all the wonderful colors like what i showed in the sample link
    Code:
    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;
     }
    }
    ganahan ta ko og JS ra para clientside ra ang processing og parsing sa text. hehehe. nya gamit lang siya DOM para update

  4. #4

    Default Re: html Code formatter

    Sorry, I can't help because it is a html.

    Try kuno i view source or firebug or something.

  5. #5

    Default Re: html Code formatter

    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.

  6. #6

    Default Re: html Code formatter

    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.

  7. #7

    Default Re: html Code formatter

    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.


  8. #8

    Default Re: html Code formatter

    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.

  9.    Advertisement

Similar Threads

 
  1. Html code question.
    By Gh0st1234 in forum Websites & Multimedia
    Replies: 10
    Last Post: 01-14-2013, 03:44 PM
  2. HTML code is off-you cannot post attachments. Why is this?
    By ghostrider in forum Support Center
    Replies: 9
    Last Post: 01-23-2011, 09:18 PM
  3. HTML Code (Redirecting)
    By Deathnote in forum Programming
    Replies: 15
    Last Post: 02-28-2010, 11:36 PM
  4. Html code
    By K0n0ha in forum Programming
    Replies: 1
    Last Post: 11-19-2008, 08:14 AM
  5. just click the html code
    By mediatrix33 in forum Websites & Multimedia
    Replies: 9
    Last Post: 10-08-2008, 01:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top