A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Allow PRE text to wrap on Confluence wiki


Add this to the wiki code:


{html}
<style type="text/css">
/* Allow PRE elements to wrap --- better than manually adding ad-hoc
 * linebreaks because
 * (a) It's automatic
 * (b) It adapts to the window width
 * (c) People can still copy-and-paste from the browser window and get the
 * original long lines
 */
pre {
 white-space: pre-wrap; /* css-3 */
 white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
 white-space: -pre-wrap; /* Opera 4-6 */
 white-space: -o-pre-wrap; /* Opera 7 */
 word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style>
{html}

Thanks duckbill