Jump to content

How to insert automatically a line wrapping in <pre> blocks?


Recommended Posts

At first lets have a look at an example webpage:

https://www.thewindowsclub.com/most-useful-commands-for-powercfg-command-line

As you can see the article contains some <pre> blocks which in turn contain commands lines which are NOT wrapped at the browser window end.

Instead a horizontal slider is displayed which let user scroll to the currently invisible part of the command line.

Now if I want to print this page (into *.png or *.pdf) important parts of these commands are NOT displayed.

How can I apply some CSS/Javascript commands which tell the rendering engine to AUTOMATICALLY (soft) wrap these over-long lines
at suitable blanks (!) into a second (or even third) line in <pre> block?

Peter

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...