Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Nov 28, 2025

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.

CleanShot.2025-11-28.at.18.23.52.mp4

When you save, the content is escaped back to valid JSON and inserted into the document.

Keep only keyboard shortcut (Cmd/Ctrl+E) and toolbar button as triggers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@adamziel adamziel changed the title Blueprint Editor: Add multiline string editor modal [Blueprint Editor] Add multiline string editor modal Nov 28, 2025
adamziel and others added 9 commits November 28, 2025 18:29
The toolbar now stays within the visible editor area when scrolling
horizontally on long lines, using a scroll listener that applies
a transform offset when needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
… strings

Replace custom string-utils with standard JSON methods. The multiline edit
button now only appears for strings that can be successfully JSON-parsed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace getLanguageLabel() and getAvailableLanguages() with a simple
languageLabels Record<SupportedLanguage, string> constant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts:
#	packages/playground/website/src/components/blueprint-editor/json-schema-editor/jsonSchemaCompletion.ts
The multiline edit feature was previously only in JSONSchemaEditor,
but BlueprintBundleEditor uses CodeEditor directly. This adds the
tooltip button and Cmd/Ctrl+E keyboard shortcut to open a modal
for editing JSON strings with proper syntax highlighting based on
the string's context (PHP, SQL, HTML, etc).
@adamziel adamziel force-pushed the edit-multiline-blueprint-strings branch from da43a42 to 9910e4e Compare November 29, 2025 23:12
@adamziel adamziel merged commit 1decd8a into trunk Nov 29, 2025
32 checks passed
@adamziel adamziel deleted the edit-multiline-blueprint-strings branch November 29, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants