Can anyone recommend a JavaScript-based code reformatter for HTML, CSS and JS?
I'm making a web-based IDE and I'd like to be able to tidy up some code without having to refresh the page or wait for an ajax request.
Note: I need it to be able to accept and return a string, and not work directly with HTML elements. My IDE doesn't use a textarea
.