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.
Usage
<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