Jump to content

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


pstein

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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...