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:


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?



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...