DEV: workflow node expression editor using CodeMirror#1634
Merged
jjaffeux merged 1 commit intodiscourse-workflowsfrom Apr 13, 2026
Merged
DEV: workflow node expression editor using CodeMirror#1634jjaffeux merged 1 commit intodiscourse-workflowsfrom
jjaffeux merged 1 commit intodiscourse-workflowsfrom
Conversation
2e34390 to
2dd7680
Compare
2dd7680 to
6aa4791
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the existing contenteditable` expression editor with a CodeMirror-based editor and adds a backend expression preview endpoint.
Expression editor
{{ }}expressions with embedded JavaScript (variables, properties, strings, numbers, operators)$json,trigger,$vars,$site_settings,$current_user,$execution,$('Node Name')references, and JavaScript globals (Math,JSON,Object, etc.){{ }}braces with immediate completion trigger{{ }}, wraps in{{ }}outside)post) are now draggable, not just leaf fieldsExpression preview
POST /expressions/evaluatewith debounced requests$jsonreflects the upstream node's output, not just the trigger'sCore CodeMirror infrastructure
codemirror-editor.gjscomponent with@extensioncallback for domain-specific behavior{{ }}Lezer grammar with mixed JavaScript parser, reusable for email templates, onebox templates, or any{{ }}surface