Skip to content

Code block does not wrap text when printing #1496

@adjurk

Description

@adjurk

Describe the bug
Using built-in print feature, if there's a code block which contains text that is wider than the printed pdf, an unscrollable scroll bar is displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Wiki page
  2. Paste a wide code block, for ex:
mkdir -p /tmp/gitea-dump/home-git-gitea-repositories && cp -r /home/git/gitea-repositories/* /tmp/gitea-dump/home-git-gitea-repositories
  1. Press the Print button in Wiki.js -> Print to PDF
  2. A pdf with an unscrollable scroll bar is generated inside that pdf.

Expected behavior
Text inside code block is automatically wrapped.

Screenshots
https://i.imgur.com/78WQ6Bp.png

Host Info (please complete the following information):

  • OS: Windows 10
  • Tested browsers: Google Chrome 79.0.3945.130, Microsoft Edge 44.18362.449.0 (EdgeHTML 18.18362)
  • Wiki.js version: 2.0.12

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcontrib-easyEasy dev difficulty for contributionuiUI related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions