Skip to content

feat(viewer): rework text and pdf viewers as @nextcloud/viewer handlers - #2015

Open
ShGKme wants to merge 4 commits into
feat/nextcloud-viewerfrom
feat/viewer-pdf-text
Open

ShGKme wants to merge 4 commits into
feat/nextcloud-viewerfrom
feat/viewer-pdf-text

Conversation

@ShGKme

@ShGKme ShGKme commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

☑️ Resolves

PDF viewer

  • Added missed URL.revokeObjectUrl()
🏚️ Before 🏡 After
image image

Text viewer

  • Limit compact mode to 80ch (align with Text app)
  • Align code blocks (incl. plain text) style with Text app (border radius, padding)
  • Polished controls
  • Removed Wrap content in code blocks switch for markdown
  • Removed contenteditable and tabindex="0" from content
    • Not great for a11y, because it was a document and a contenteditable field at the same time
    • It was added for simple selection and copy with CTRL+A
    • Instead, added CTRL+A as hotkey
  • Added role="document" with aria-label="file.dysplayname
  • Preserver configs (Full width mode, wrap) in browser storage

Text viewer -- markdown

🏚️ Before 🏡 After
image image
image image

🆕 Text viewer -- code

  • Rendering code (up to 1MB) in NcRichText code block for highlighting
🏚️ Before 🏡 After
image image

Text viewer -- plain text

🏚️ Before 🏡 After
image image
image image
image image

@ShGKme
ShGKme requested a review from Antreesy October 29, 2026 22:09
@ShGKme ShGKme self-assigned this Oct 29, 2026
@ShGKme
ShGKme added this pull request to stack #2013 October 29, 2026 22:09
@ShGKme ShGKme added the enhancement New feature or request label Oct 29, 2026
@ShGKme
ShGKme force-pushed the feat/viewer-pdf-text branch from 2426bb0 to 7b92685 Compare October 29, 2026 22:11
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme
ShGKme force-pushed the feat/viewer-pdf-text branch from 7b92685 to 426f4bc Compare October 29, 2026 22:12
@ShGKme
ShGKme marked this pull request as ready for review October 29, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant