Code Editor

- CodeHighlighter is a component that provides syntax highlighting for code snippets. - It supports various programming languages and can display line numbers for better readability.
Overview Playground API

Usage

Disable editor


  
    <code-editor id="business-rule-editor" style="display:block; height: 300px"></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