最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - SQL autoformatting in codeMirror - Stack Overflow

programmeradmin4浏览0评论

I'm trying to "beautify" sql code in codeMirror .

Autoformatting in not supported in codeMirror since v2 (current version is v4)

I've tried to use the old module formatting.js with autoFormatRange function ( the previous question on StackOverflow here). It doesn't seem to work properly with SQL. It makes indentation without any linebreaks

Did anyone figure out how to get this feature working on codeMirror v4 with SQL?

I'm trying to "beautify" sql code in codeMirror .

Autoformatting in not supported in codeMirror since v2 (current version is v4)

I've tried to use the old module formatting.js with autoFormatRange function ( the previous question on StackOverflow here). It doesn't seem to work properly with SQL. It makes indentation without any linebreaks

Did anyone figure out how to get this feature working on codeMirror v4 with SQL?

Share Improve this question edited Aug 8, 2018 at 22:00 JasonMArcher 15k22 gold badges59 silver badges53 bronze badges asked May 19, 2017 at 9:34 BrunoBruno 1531 silver badge9 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

I've solved the problem using this js auto-formatter : https://github./zeroturnaround/sql-formatter

It does an excellent job at formatting SQL (demo here)

发布评论

评论列表(0)

  1. 暂无评论