Text Size
Tuesday, September 19, 2017
Latest Learn Demos Code Highlighter Test

I ran across a handy Joomla plugin that makes it beyond easy to insert some blocks of code in the article.  It can be used to type code directly into the article or pull the code from the Jumi component.

It's not the most robust and feature rich "code insert" plugin that I've seen... but it is the simplest... and it works...

 

 

Here's some text before the code block...

<div id="flip1">
<p>This slideshow requires <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 10.0</a> (or higher). JavaScript must be enabled.</p>
</div>
 
<script type="text/javascript">
 
	var flashvars =
	{
	xmlfile:"<?php $_SERVER['DOCUMENT_ROOT'] ?>/images/site/flip/flip.xml",
        loaderColor:"0xCCCCCC"
	};
 
	var params =
	{
	wmode: "transparent"
	};
 
	var attributes =
	{
	id: "flip",
	name: "flipit"
	};
 
	swfobject.embedSWF("<?php $_SERVER['DOCUMENT_ROOT'] ?>/flip/flip.swf", "flip1", "940", "500", "10.0.0", "<?php $_SERVER['DOCUMENT_ROOT'] ?>/swfobject/expressInstall.swf", flashvars, params, attributes);
 
</script>

Now this is after the code block.

 

How about a second block...

 
<div id="flip1">
<p>This slideshow requires <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 10.0</a> (or higher). JavaScript must be enabled.</p>
</div>
<script type="text/javascript">
    swfobject.embedSWF("./flip/flip.swf", "flip1", "940", "400", "10.0.0", false, {xmlfile:"default.xml", loaderColor:"0xCCCCCC"}, {wmode: "transparent"});
</script>
 

... and that's it.

If you are interested, you can get it here.


blog comments powered by Disqus

Marlin Creek Feedburner Feed