开发者

Code/Function/Library to intent/format/prettify JavaScript/QtScript code for readablity within the application?

Greetings,

in one of my applications I provide a simple code editor based on a QTextEdit widget and the QSyntaxHighlighter. I was wondering if there is function, library or generally a way to allow the user to have his/her code re-formatted and indented within the application?

Websites like this allow you to re-format and intent JavaScript/QtScript/ECMAScript code easily, but it would be nice to h开发者_StackOverflow社区ave a "Format Code" button right next to the code editor.


You could try to experiment with astyle or indent. Although these programs are mostly made to format C/C++, they might give acceptable results with javascript.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜