symfony-expression-editor
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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/bootstrap@5.3.3/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

Readme

Keywords

none

Package Sidebar

Install

npm i symfony-expression-editor

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

141 kB

Total Files

8

Last publish

Collaborators

  • valtzu