0

tAll the experienced asp.net developers, suggestions pls.

I want to be able to use an HTML Editor into MVC 3 app. After googling, I found that TinyMCE JavaScript plugin would fit. My question here is? How can I highlight or indent and color HTML tags so it would be easy to read and edit them. For example, Visual Studio arrange very well the html on aspx or views page coloring each element :)

Can I achieve somehow the same result in an Html Editor code generated markup? Thanks!

A.Mano
  • 291
  • 1
  • 3
  • 7
  • AFAI see TinyMCE renders a WYSIWYG HTML editor for your text area and hides the original text are control. Hence you don't see the raw HTML output in the browser, but it will be posted with the text area to the server. So the question is, where would you show the HTML result with the highlighting and indenting? Can it be done on the server-side, or do you expect a solution in javascript on the client side? – Tz_ Jul 11 '11 at 15:38
  • Yeah javascript would be nice, because it can be used easily for IPhone apps, but i wondering any case how to accomplish the indentation of tags or coloring of html markup? so it could be easy to read the arranged elements such as divs, p, ect. – A.Mano Jul 11 '11 at 16:14

1 Answers1

0

I think your question boils down to this: Syntax highlighting code with Javascript

Your code language is HTML, and you need syntax highlighting and indentation. For example Prettify (mentioned in the first answer to the other question) can do that. Check out the HTML sample of Prettify here http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html#html

But you will see that HTML is quite broadly supported among the mature syntax highlighting javascript libraries, so it is worth to check out the others as well.

Community
  • 1
  • 1
Tz_
  • 2,949
  • 18
  • 13