This page is still a beta!

Chapter 1. EXT: Code Snippets

Extension Key: jph_codesnippets

Copyright 2000-2002, Jan-Philipp Halle, <typo3 [at] jphalle.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

1.1. Introduction

What does it do?

  • This extension provides a new content element, which displays source code either from a file plus an optional download link or from a text field.

  • This extensions uses GeSHi (http://www.qbnz.com/highlighter) to format the output:

    • GeSHi stands for a Genric Syntax Highlighter and supports over 40 languages.

    • The output of GeSHi is XHTML compliant.

    • You can wrap the the code either with a PRE or a DIV tag.

    • GeSHi supports CSS formatting.

    • All language highlighting files can be customized. Currently I'm writting the TypoScript file (see to-do list).

  • Nearly all settings of GeSHi are supported by this extension:

    • The style settings are placed in the TS setup.

    • Settings for numbering and highlighting of special lines can be set by the editor.

Screenshots

Short example output

Editor's view for file upload

Editor's view for cut and paste inserting in a text field

Editor's view of available display options