Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
wozjac
Active Participant
4,487

As the built-in beautifier in SAP Web IDE is too basic for me (especially for XML views), I decided to add support for js-beautify, a much more advanced code formatter.


js-beautify project: https://github.com/beautify-web/js-beautify

Online: https://beautifier.io


Supported file types are js, json, css, html and xml. When such file is opened, a new option is enabled in the Edit menu, bound to Shift + F1 combination.



There is an advanced set of options, which can be used by adding a .jsbeatuifyrc file in the project root folder. More about it can be found in the js-beautify documentation.



Installation


Add a new destination in the Cloud Platform Cockpit.
URL: https://sapwebidejsbeautify-p791767trial.dispatcher.hanatrial.ondemand.com


Go to Extensions in SAP Web IDE (refresh if already opened) - the extension should be available (wait some minutes if not and refresh).




Project on GitHub: https://github.com/wozjac/sap-web-ide-jsbeautify

Please take a look at my other plugin for Markdown files preview: https://blogs.sap.com/2019/02/04/sap-web-ide-markdown-.md-preview/. If you like/want to try UI5 development with Brackets editor, you can check my Brackets UI5 plugin: https://github.com/wozjac/brackets-ui5.

9 Comments
Labels in this area