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

How to enable line wrap in the Joomla Geshi plugin

JOOMLABOTTOM 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

Don

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!
Zuletzt aktualisiert am Dienstag, 05. Mai 2009 um 11:58 Uhr
 

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:
  The word for verification.
Lowercase letters only with no spaces.

The word for verification.<br/>Lowercase letters only with no spaces.
Word verification:

Titel:
Comment:
Comments (4)
Thanks
4 Donnerstag, 30. Juni 2011 um 12:51 Uhr
Joel
Well stated sir!
Marvelous
3 Dienstag, 15. März 2011 um 16:10 Uhr
Thomas
just perfect...
Excellent
2 Mittwoch, 12. Januar 2011 um 08:43 Uhr
Shown
I'm not using Joomla but this snippet works fine also in a normal GeSHi installation. Thanks
Quite alright
1 Sonntag, 21. März 2010 um 23:07 Uhr
Alexis
I like it.

Our Recommended Reading

For those interested in extending their 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.


Joomla! Social Networking with JomSocial
Joomla! Social Networking
with JomSocial

by Kwasi Boateng & Beatrice A. Boateng.
Joomla! 1.5 Multimedia
Joomla! 1.5 Multimedia
by Allan Walker.


Building job sites with Joomla!
Building job sites with Joomla!
by Santonu Kumar Dhar.

Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide
Joomla! Template Design: 2nd Edition
Create your own professional-quality
templates with this fast, friendly guide
by Tessa Blakeley Silver.
Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review

object-oriented-javascript-applications-libraries
Object-Oriented JavaScript by
Stoyan Stefanov gives you a very
comprehensive grounding in
the latest Javascript techniques.

Read the review
Joomla! Web Security
Joomla! Web Security
by Tom Canavan.

Joomla 1.5 Top Extensions Cookbook
Joomla 1.5 Top Extensions Cookbook by
Suhreed Sarkar is an ideal and concise round up of the extensions available for the Joomla! system.

Read the review

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.

Mastering Joomla! 1.5 Extension and Framework Development
Mastering Joomla! 1.5 Extension and
Framework Development : 2nd Edition

by James Kennard.
Read the review

Building job sites with Joomla!
Building job sites with Joomla!
by Santonu Kumar Dhar.
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! 1.5 Site Blueprints Joomla! 1.5 Site Blueprints
by Timi Ogunjobi.

Joomla! 1.5 JavaScript jQuery Joomla! 1.5 JavaScript jQuery
by Jose Argudo Blanco.
Read the review
Joomla! Social Networking with JomSocial Joomla! Social Networking with JomSocial
by Kwasi Boateng & Beatrice A. Boateng.

Joomla! 1.5 Multimedia Joomla! 1.5 Multimedia
by Allan Walker.

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 : 2nd Edition
by James Kennard.

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

Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review

JOOMLABOTTOM



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