From dbdb77b05760122f36c5d7cd05446a54b7bbded9 Mon Sep 17 00:00:00 2001 From: Alessandro <155005371+3clyp50@users.noreply.github.com> Date: Fri, 17 Jul 2026 03:42:27 +0200 Subject: [PATCH] Show full documents in Editor Remove heading-based Markdown pagination so source and preview operate on the complete file. Add support for keyboard undo/redo ops. Give plain text documents the same preview, formatting, save, and file-action toolbar as Markdown, with regression coverage for both behaviors. --- plugins/_editor/AGENTS.md | 1 + plugins/_editor/webui/editor-panel.html | 45 ++++++------ plugins/_editor/webui/editor-preview.js | 94 +++--------------------- plugins/_editor/webui/editor-store.js | 96 +++++++++++-------------- tests/test_office_canvas_setup.py | 63 +++++++++++++++- 5 files changed, 132 insertions(+), 167 deletions(-) diff --git a/plugins/_editor/AGENTS.md b/plugins/_editor/AGENTS.md index 6aa878756..8d4fabda6 100644 --- a/plugins/_editor/AGENTS.md +++ b/plugins/_editor/AGENTS.md @@ -20,6 +20,7 @@ - Keep Editor Open wired through the File Browser text picker so users can open one or more Markdown or plain text files with an obvious confirmation action. - Keep Download in the Editor file-actions menu and save dirty text before downloading it. - Keep Save As distinct from Rename: Save As writes the current editor text to a chosen `.md` or `.txt` path and retargets the active session without removing the original file. +- Keep Markdown and plain text on the same toolbar, with full-document source and preview modes plus shared Undo/Redo buttons and keyboard shortcuts. - Preserve source chat context ids when opening Markdown files from tool-result canvas handoffs. ## Work Guidance diff --git a/plugins/_editor/webui/editor-panel.html b/plugins/_editor/webui/editor-panel.html index 4abb20e2f..fcf18713d 100644 --- a/plugins/_editor/webui/editor-panel.html +++ b/plugins/_editor/webui/editor-panel.html @@ -8,7 +8,7 @@