Skip to content

fix(editor): preserve rich copy, add Select All, and update Workspace icon - #273

Merged
ThisIs-Developer merged 5 commits into
mainfrom
fix/270-rich-copy-select-all
Oct 9, 2026
Merged

ThisIs-Developer merged 5 commits into
mainfrom
fix/270-rich-copy-select-all

Conversation

@ThisIs-Developer

@ThisIs-Developer ThisIs-Developer commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Preview Copy used a text-only clipboard write, so pasting into Google Docs lost the document formatting. It now supplies sanitized HTML and readable plain text for context-menu Copy and native browser Copy, including partial selections. A copy-event fallback supports browsers without asynchronous HTML clipboard writes. Preview controls are excluded from copied content.

The copy commands follow their document context:

  • Copy Markdown in the navbar/mobile menu and Ctrl/Cmd+Shift+C copy the entire raw document in every view, regardless of a partial selection. With two documents open, they use the last-focused Editor or Preview, including unsaved edits. Toolbar clicks preserve that target.
  • Editor Copy and Ctrl/Cmd+C copy selected raw source. Preview Copy supplies selected rendered content as HTML plus plain text. Ordinary Copy with no selection leaves the clipboard unchanged.
  • Select All and Ctrl/Cmd+A select only the clicked/focused pane, including secondary documents. Mouse and keyboard menus close after Select All and return focus to the pane. Touch menus keep Copy available after Select All and close after Copy.
  • On touch devices, dismissing the menu onto the surrounding background preserves the selection. Tapping highlighted text reopens Copy, including partial selections and either document pane. The menu can also reopen after Copy. Swipes scroll, and tapping unselected text keeps normal selection/cursor behavior.
  • Touch presses cannot start the native text drag that produced a floating duplicate of the selected text. Stationary Preview taps are handled before compatibility mouse events; Editor taps avoid the native contextmenu/mouseup race that immediately dismissed the new menu. Background dismissal also works when WebKit emits no click event. Mouse dragging and keyboard behavior remain native.
  • Preview remains read only. Editor Paste inserts clipboard text at the cursor or replaces the selection. Native text controls retain their keyboard behavior, and view-only snapshot/release-note source restrictions also apply to the Copy Markdown shortcut.

Workspace rows use Lucide's bundled briefcase-business icon in web and desktop, including collapsed and drag-expanded states. The Features and Usage Guide explain selection and copying, whole-document tooltips are translated in all 15 catalogs, and shared desktop resources are synchronized.

Validation on the final change:

  • npm test -- -- --workers=1: build/static/SEO checks, 22 unit tests and all 287 Chromium tests passed.
  • Touch suite across Chromium, Firefox, and WebKit: 34 passed, 2 expected skips for the Chromium-only native swipe test. Covers dismissal, reopening, reopening again after Copy, partial selections, secondary panes, drag prevention, scrolling, and touch menus without pointer metadata.
  • Editor and startup smoke checks in Firefox and WebKit: 24 passed.
  • The 33 clipboard cases include real Chromium clipboard writes and rich-text pasting through the modern API, both fallback paths, and native Copy.
  • Locale audit passed for all 15 catalogs. node desktop-app/prepare.js completed; web and desktop scripts match. git diff --check passed.

Physical Android PWA → Google Docs verification remains a manual check; automated browser touch and clipboard tests do not exercise the native Docs app.

Closes #270.

@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
markdown-viewer Ready Ready Preview Oct 9, 2026 4:54am UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 28b1a77
Status: ✅  Deploy successful!
Preview URL: https://90c7575f.markdownviewer.pages.dev
Branch Preview URL: https://fix-270-rich-copy-select-all.markdownviewer.pages.dev

View logs

This comment was marked as outdated.

@ThisIs-Developer ThisIs-Developer added bug Something is broken or not working as expected. enhancement New feature, improvement, or usability enhancement. ui/ux User interface, layout, interaction, usability, or visual improvements. labels Oct 8, 2026 — with ChatGPT Codex Connector
@ThisIs-Developer ThisIs-Developer changed the title fix(clipboard): preserve preview formatting and add Select All fix(editor): preserve rich copy, add Select All, and update Workspace icon Oct 8, 2026
@ThisIs-Developer

ThisIs-Developer commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner Author

Hi @Sifu5, please review the latest update when you get a chance.
Link: https://fix-270-rich-copy-select-all.markdownviewer.pages.dev/
I’ve also added a Select All option to make selecting and copying the complete document easier.

Please check whether everything is working correctly and whether the formatting remains consistent when pasting the copied content into a DOCX/Word document.

If you notice any issue, please let me know. Thank you!

@ThisIs-Developer
ThisIs-Developer merged commit ff0648a into main Oct 9, 2026
5 checks passed
@ThisIs-Developer
ThisIs-Developer deleted the fix/270-rich-copy-select-all branch October 9, 2026 17:48

This branch was successfully deployed

1 active deployment
Preview — 28b1a772 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken or not working as expected. enhancement New feature, improvement, or usability enhancement. ui/ux User interface, layout, interaction, usability, or visual improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback & Feature Request

2 participants