How to Beautify/Prettify the text?


#1

Is there any way to beautify the JS and/or HTML and/or CSS? Text gets messy quite quickly and it’s a pain to just copy/paste to a different editor, only to copy/paste back into Glitch.

Thanks!


#2

Nothing official just yet, but another Glitch user did create this bookmarklet to use prettier: https://prettier.glitch.me/


#3

I’m having trouble with this now, getting this error in the console about violating security policy


Can you integrate text formatter tool?
#4

Hi @madmaxlax,

Thanks for the report, we recently updated our Content Security Policy on glitch.com to reduce the risk of XSS and other potential security issues.

We’ll take a look and see if there is a good compromise to allowing 3rd party services while maintaining rigorous security.

Thanks again for reporting this!


#5

Hey all, I created a new version to solve this problem, you can check it out here. It does not require a REST service to perform the job:

https://prettier-new.glitch.me/