web design, England, Britain, UK, belgium
 
Ulti Clocks content

How to enable line wrap in the Joomla Geshi plugin

GJC Web Design Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help sand How to make the Joomla GeSHi plugin line wrap at the correct layout width by changing the pre css styling.
wrap, pre, space, code, white, css, template, geshi, snippet, break, layout, tag, word, plugin, joomla, wrapping, just, solve, problem, paste, cover, lot, hidden, family, normally, moz, normal, font, overflow, courier, eventuallities, following, line, end, page, adding, prevents, highlighter, default, generic

Home Joomla - VirtueMart Joomla & VM How To's How to enable line wrap in the Joomla Geshi plugin

Thu

16

Apr

How to enable line wrap in the Joomla Geshi plugin

  • Joomla 1.5 + 1.0
  • GeSHi Plugin

The default css for the Joomla GeSHi (Generic Syntax Highlighter) plugin prevents any line wrapping until the end of any code snippet. This can often break your page layout.

By adding these couple of lines to the template css the code breaks nicely to fit within your layout.
Joomla line wrap geshi nowrap
If your code isn't wrapping where it should do the following -
The element tag for GeSHi is <pre xml:html> so find which style sheet is operating on the "pre" tag, normally your template_css.css or template.css (J1.0).


Paste in this code snippet (it seems a lot just to wrap but this is to cover all eventuallities Wink )
 
pre,
.code {
 white-space:normal;
 white-space: pre-wrap;
 white-space: -moz-pre-wrap;
 white-space: -pre-wrap;
 white-space: -o-pre-wrap;
 word-wrap: break-word;
 font-family:courier;
 overflow:hidden;
}
 

Joomla line wrap geshi wrap That should solve the problem....


Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! Spurl! Newsvine! Furl! Fark! Yahoo! Netvouz! Mister-Wong! RawSugar! Ma.gnolia! Squidoo! DZone! Swik!
Last Updated on Tuesday, 05 May 2009 11:58 Read : 4005 times
 
Comments (1)
Quite alright
1 Sunday, 21 March 2010 23:07
Alexis
I like it.

Add your comment

BoldItalicUnderlineStrikethroughSubscriptSuperscriptEmailImageHyperlinkOrdered listUnordered listQuoteCodeHyperlink to the Article by its id
Very HappySmileWinkSadSurprisedShockedConfusedCoolLaughingMadRazzEmbarrassedCrying or Very SadEvil or Very MadTwisted EvilRolling EyesExclamationQuestionIdeaArrowNeutralMr. GreenGeekUber Geek
Your name:
Subject:
Comment:

Latest Articles

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

VM Live Product Search

Recommended Reading

For those interested in extending there knowledge of Joomla! & VirtueMart Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.

Learning Joomla! 1.5 Extension Development Learning Joomla! 1.5 Extension Development
by Joseph L. LeBlanc.
Read the review
Joomla! E-Commerce with VirtueMart Joomla! E-Commerce with VirtueMart
by Suhreed Sarkar.
Read the review
Joomla! Web Security Joomla! Web Security
by Tom Canavan.

Mastering Joomla! 1.5 Extension and Framework Development Mastering Joomla! 1.5 Extension and Framework Development
by James Kennard.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide
by Tessa Blakeley Silver.

GJC Web Design Joomla & VirtueMart how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help

A collection of help articles and coding examples for Joomla & Virtuemart

Belgium, VirtueMart & Joomla Web Design England UK Britain & Germany

Joomla, VirtueMart, how to, tips, tricks, coding examples, html, php, tutorial, 101, useful hints, help



How to enable line wrap in the Joomla Geshi plugin



How to make the Joomla GeSHi plugin line wrap at the correct layout width by changing the pre css styling.


wrap, pre, space, code, white, css, template, geshi, snippet, break, layout, tag, word, plugin, joomla, wrapping, just, solve, problem, paste, cover, lot, hidden, family, normally, moz, normal, font, overflow, courier, eventuallities, following, line, end, page, adding, prevents, highlighter, default, generic