How to add Html Editor with indented and colored generated HTML markup into Asp.net MVC 3?
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 eas开发者_Go百科y 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!
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.
精彩评论