A Craft extension to format code blocks using Prettier
Preview the result on blocks clicking.
Options are the same with Prettier Playground, so the formatting result can be
fine-tuned.
the parser is specified automatically based on the language of the selected block, but for those languages Craft doesn't support it, it still can be specified manually.
Just click the format
button, and the content of the block will be updated.
Simply run npm install
and than npm run build
to generate the .craftX file which can be installed.
You can use npm run dev
to test and debug in your local environment
To learn more about Craft eXtensions visit the Craft X developer portal.