Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bpmn-io/feel-editor

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bpmn-io/feel-editor

Editor for FEEL expressions.

  • 1.9.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
increased by0.21%
Maintainers
0
Weekly downloads
 
Created
Source

@bpmn-io/feel-editor

Embeddable Editor for FEEL expressions.

Usage

To get started, create a feel-editor instance:

import FeelEditor from '@bpmn-io/feel-editor';

const editor = new FeelEditor({
  container
});

Configure the FEEL dialect (expression or unary tests):

const editor = new FeelEditor({
  container,
  dialect: 'unaryTests' // defaults to 'expression'
});

You can provide a starting document and listen for changes:

const editor = new FeelEditor({
  container,
  onChange,
  onKeyDown,
  onLint,
  value
});

Variables

You can provide a variables array that will be used for auto completion. Nested structures are supported. The Variables need to be in the following format:

const editor = new FeelEditor({
  container,
  variables: [
    {
      name: 'variablename to match',
      detail: 'optional inline info',
      info: 'optional pop-out info',
      entries: [
        {
          name: 'nested variable',
          ...
        }
      ]
    }
  ]
});

The variables can be updated on the instance via FeelEditor#setVariables():

editor.setVariables([
  {
    name: 'newName',
    detail: 'new variable inline info',
    info: 'new pop-out info'
  }
]);

Content attributes

You can provide attributes which will be set on the content editable div:

const editor = new FeelEditor({
  container,
  contentAttributes: {
    'aria-label': 'Expression editor'
  }
});

Hacking the Project

To get the development setup make sure to have NodeJS installed. As soon as you are set up, clone the project and execute

npm install
npm start

License

MIT

Keywords

FAQs

Package last updated on 23 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc