Thanks to visit codestin.com
Credit goes to github.com

Skip to content

valtzu/symfony-expression-editor

Repository files navigation

Symfony Expression Editor Web Component

What

Enhance regular <textarea> element with linting, syntax highlighting, autocompletion etc. Contains styles so that it looks like built-in Bootstrap 5.3 component. Editor styles are reactive to data-bs-theme attributes.

Why

Configuring CodeMirror and making it blend into UI can be tricky

How to use

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script type="module" src="https://esm.sh/symfony-expression-editor"></script>
<textarea class="form-control" is="expression-editor" rows="1">'foobar' starts with 'foo'</textarea>

image