Code Editor

- CodeEditor wraps Monaco Editor as a web component. - Supports JS/JSON/HTML languages, read-only mode, line numbers, minimap, and dark/light theme. - Emits
Overview Playground API

Usage

Disable editor


  
    <wc-code-editor id="business-rule-editor" style="display:block; height: 300px"></wc-code-editor>
    <script>
      document.getElementById('business-rule-editor').value = `/**
* Sample Code
*/
function myBusinessRuleFunction(){
  const a = 1;
  const b = 2;
  let c = a + b;
  console.log(c);
}`;

      document.querySelector('#disableEditor').addEventListener('change', function(evt) {
        document.getElementById('business-rule-editor').disabled = evt.target.value;
      });
    </script>
  

On this page

Usage
Work in progress

Properties

Events

Methods

CSS Custom Properties