Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
/ css-format-monaco Public archive

css/less/scss format support for monaco editor

License

Notifications You must be signed in to change notification settings

troy351/css-format-monaco

Repository files navigation

css-format-monaco

Downloads Version License

CSS Formatter Plugin for monaco-editor

CSS / LESS / SCSS Support

Deprecated

CSS Formatter was builtin since [email protected]

Compatibility

Compatible with Monaco Editor v0.12.0 and above

Install

$ npm install css-format-monaco

Usage

ES Module

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

<script src="https://unpkg.com/css-format-monaco/dist/css-format-monaco.min.js"></script>
<script>
  // NOTE: monaco-editor should be loaded first
  // see above esm example for details
  cssFormatMonaco(monaco);
</script>

License

MIT

About

css/less/scss format support for monaco editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published