Skip to content

馃敥 Enable double-click paragraph selection and copying - #215

Open
JFWooten4 wants to merge 1 commit into
mainfrom
feature/double-click-paragraph-copy-20261023
Open

JFWooten4 wants to merge 1 commit into
mainfrom
feature/double-click-paragraph-copy-20261023

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Summary

  • Double-click text within a PDF paragraph to select its text and immediately copy it to the clipboard.
  • Prefer PDF structure tags when available, with a visual-line fallback for untagged PDFs that respects indentation, line spacing, font-size changes, and adjacent columns.
  • Join visual line wraps into readable paragraph text; respect Copy selection as Markdown and its formatting when enabled.
  • Preserve normal drag selection and existing single-click navigation, use the viewer's clipboard fallback, and display success or error feedback.

Tests

  • Added tests/paragraph-double-click.test.mjs to the npm test script, covering wrapped text, semantic paragraph tags, columns/headings, Markdown formatting, and double-click clipboard behavior.
  • Targeted Node tests passed locally (5/5) against the paragraph grouping logic and equivalent existing copy formatter. Full repository test suite and in-browser behavior have not yet been run.

Note

For untagged PDFs, paragraph boundaries are inferred from text layout and may be approximate in unusually complex scans or multi-column layouts.

Detect semantic or visually wrapped PDF paragraphs, select all their text when double-clicked, and automatically copy them with the existing Markdown setting. Respect column boundaries, preserve ordinary selection, and add focused tests.

Co-authored-by: Codex Web <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant