@bpmn-io/feel-editor 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,8 +28,8 @@ const editor = new FeelEditor({
28
28
 
29
29
  ### Variables
30
30
 
31
- You can provide a variables array that will be used for auto completion. Nested
32
- structures are supported.
31
+ You can provide a variables array that will be used for auto completion. Nested
32
+ structures are supported.
33
33
  The Variables need to be in the following format:
34
34
 
35
35
  ```JavaScript
@@ -63,6 +63,19 @@ editor.setVariables([
63
63
  ]);
64
64
  ```
65
65
 
66
+ ### Content attributes
67
+
68
+ You can provide attributes which will be set on the content editable div:
69
+
70
+ ```javascript
71
+ const editor = new FeelEditor({
72
+ container,
73
+ contentAttributes: {
74
+ 'aria-label': 'Expression editor'
75
+ }
76
+ });
77
+ ```
78
+
66
79
  ## Hacking the Project
67
80
 
68
81
  To get the development setup make sure to have [NodeJS](https://nodejs.org/en/download/) installed.
package/dist/index.es.js CHANGED
@@ -842,6 +842,7 @@ const autocompletionConf = new Compartment();
842
842
  function FeelEditor({
843
843
  extensions: editorExtensions = [],
844
844
  container,
845
+ contentAttributes = {},
845
846
  tooltipContainer,
846
847
  onChange = () => {},
847
848
  onKeyDown = () => {},
@@ -893,6 +894,7 @@ function FeelEditor({
893
894
  bracketMatching(),
894
895
  changeHandler,
895
896
  closeBrackets(),
897
+ EditorView.contentAttributes.of(contentAttributes),
896
898
  indentOnInput(),
897
899
  keyHandler,
898
900
  keymap.of([
package/dist/index.js CHANGED
@@ -844,6 +844,7 @@ const autocompletionConf = new state.Compartment();
844
844
  function FeelEditor({
845
845
  extensions: editorExtensions = [],
846
846
  container,
847
+ contentAttributes = {},
847
848
  tooltipContainer,
848
849
  onChange = () => {},
849
850
  onKeyDown = () => {},
@@ -895,6 +896,7 @@ function FeelEditor({
895
896
  language$1.bracketMatching(),
896
897
  changeHandler,
897
898
  autocomplete.closeBrackets(),
899
+ view.EditorView.contentAttributes.of(contentAttributes),
898
900
  language$1.indentOnInput(),
899
901
  keyHandler,
900
902
  view.keymap.of([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-io/feel-editor",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Editor for FEEL expressions.",
5
5
  "files": [
6
6
  "dist"