user373201
user373201

Reputation: 11455

Print HTML on webpage

I want to print some java, jsp code on webpage in an indented format.

Is There a tool that would do it, right now I have to use &nbsp, &lt, &gt to get it done, which is very painful

Upvotes: 1

Views: 272

Answers (3)

Ibrahim Azhar Armar
Ibrahim Azhar Armar

Reputation: 25753

You would have to find the dynamic way of storing and printing the text for example with the combination of javascript and php you can easily achieve this with the help of free and open text editor like WYSIWYG Editor

Have a look at this URL : http://www.openwebware.com/

this can provide a complete solution to you. and embedding on your website should not be a problem, just google something like embedding WYSIWYG Editor etc. you can always find many good tutorial that explain step by step how to do this..

hope this helps you..

Upvotes: 0

Nathan Osman
Nathan Osman

Reputation: 73285

If you have access to a text editor, you could just use "Find & Replace..."

Just replace:

  • < with &lt;
  • > with &gt;
  • (two spaces) with &nbsp;&nbsp;

Upvotes: 1

Justin Ethier
Justin Ethier

Reputation: 134257

You could just use the <pre> tag...

Upvotes: 2

Related Questions