web design, England, Britain, UK, belgium
 

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

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

Home Joomla VirtueMart Tips 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 ;) )
 
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....
Last Updated on Tuesday, 05 May 2009 11:58
 
VirtueMart
Your Cart is currently empty.



How to enable line wrap in the Joomla Geshi plugin|Joomla & VirtueMart Tips & How To's



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

|

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.