css/less/scss format plugin for monaco-editor
CSS Formatter Plugin for monaco-editor
CSS / LESS / SCSS Support
Compatible with Monaco Editor v0.12.0 and above
``shell`
$ npm install css-format-monaco
ES Module
`javascript
import cssFormatMonaco from "css-format-monaco";
const dispose = cssFormatMonaco(
// monaco-editor it self. If not provided, will use window.monaco instead.
// This could make the plugin support both ESM and AMD loaded monaco-editor
monaco,
// options
// see full option list at https://github.com/beautify-web/js-beautify#css--html
{
tab_size: 2
}
);
// run it if you want to dispose this plugin
dispose();
`
Browser
`html``
MIT