You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: screenshot of markdown preview via #panel-live-preview-frame
When a markdown file is open, the preview panel uses #panel-md-preview-frame
instead of #panel-live-preview-frame. Redirect the selector automatically
in phoenix-builder-client.js so '#panel-live-preview-frame' works for both
HTML and markdown previews.
Update MCP tool description to mention markdown preview support.
Copy file name to clipboardExpand all lines: src-node/mcp-editor-tools.js
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -88,18 +88,19 @@ function createEditorMcpServer(sdkModule, nodeConnector, clarificationAccessors)
88
88
"takeScreenshot",
89
89
"Take a screenshot of the Phoenix Code editor application window or the live preview within it (not a web page). "+
90
90
"The editor window contains: a toolbar at the top, a file tree sidebar on the left, "+
91
-
"the code editor area in the center, and optionally a live preview panel on the right "+
92
-
"that renders the HTML/CSS/JS output of the currently edited file in a browser view. "+
91
+
"the code editor area in the center, and optionally a live preview panel on the right. "+
92
+
"The preview panel shows either an HTML/CSS/JS browser view or a rendered markdown preview "+
93
+
"(when a markdown file is open, the panel shows a WYSIWYG markdown editor/viewer). "+
93
94
"By default captures the entire editor window and returns the screenshot as an inline PNG image. "+
94
95
"If filePath is specified, saves to that file and returns the path instead. "+
95
96
"Prefer capturing specific regions using the selector parameter instead of the full window: "+
96
-
"use '#panel-live-preview-frame' to capture only the live preview content, "+
97
+
"use '#panel-live-preview-frame' to capture the preview panel (works for both HTML live preview and markdown preview), "+
97
98
"or '.editor-holder' to capture only the code editor area. "+
98
99
"Only omit the selector when you need to see the full editor application layout. "+
99
100
"Note: live preview screenshots may include Phoenix toolbox overlays on selected elements. "+
100
101
"Use purePreview=true to temporarily hide these overlays and render the page as it would appear in a real browser.",
101
102
{
102
-
selector: z.string().optional().describe("CSS selector to capture a specific element. Use '#panel-live-preview-frame' for the live preview, '.editor-holder' for the code editor."),
103
+
selector: z.string().optional().describe("CSS selector to capture a specific element. Use '#panel-live-preview-frame' for the preview panel (HTML live preview or markdown preview), '.editor-holder' for the code editor."),
103
104
purePreview: z.boolean().optional().describe("When true, temporarily switches to preview mode to hide element highlight overlays and toolboxes before capturing, then restores the previous mode."),
104
105
filePath: z.string().optional().describe("Absolute path to save the screenshot as a PNG file. If specified, returns the file path instead of inline image data.")
0 commit comments