Skip to content

Commit 1decd8a

Browse files
authored
[Blueprint Editor] Add multiline string editor modal (#2962)
Editing PHP code or SQL queries inside Blueprint JSON is painful because newlines become `\n` escape sequences. This adds a modal editor that lets you edit string values as actual multiline text with proper syntax highlighting. When your cursor is inside a string value, a floating "Multiline Edit" toolbar appears above it. You can also press Cmd/Ctrl+E. The modal opens with the string content unescaped and syntax-highlighted based on the step type—PHP for `runPHP` steps, SQL for `runSQL`, and so on. If the step type doesn't give enough context, it falls back to detecting the language from the content itself (looking for `<?php`, SQL keywords, HTML tags, or Markdown patterns). You can always override the detected language with the dropdown. https://github.com/user-attachments/assets/68231869-2f4b-4ac2-95f4-96711f73abc1 When you save, the content is escaped back to valid JSON and inserted into the document.
1 parent 39612a9 commit 1decd8a

File tree

12 files changed

+1209
-110
lines changed

12 files changed

+1209
-110
lines changed

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"@codemirror/lang-javascript": "6.2.4",
7575
"@codemirror/lang-json": "6.0.2",
7676
"@codemirror/lang-markdown": "6.3.4",
77+
"@codemirror/lang-sql": "6.8.0",
7778
"@codemirror/lang-php": "6.0.2",
7879
"@codemirror/language": "6.11.3",
7980
"@codemirror/search": "6.5.11",

0 commit comments

Comments
 (0)