.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ===================== EXT: Text Highlighter ===================== :Author: Spyker :Created: 2006-05-21T15:02:16 :Changed by: Michiel Roos :Changed: 2007-05-23T23:27:44 :Email: extensions@typofree.org :Info 2: :Info 3: :Info 4: .. _EXT-Text-Highlighter: EXT: Text Highlighter ===================== Extension Key: **texthighlighter** Copyright 2007, Michiel Roos, 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 .. _Table-of-Contents: Table of Contents ----------------- **EXT: Text Highlighter 1** **Introduction 1** What does it do? 1 Requirements 1 Screenshots 2 **User manual 4** Reference 4 **To-Do list 4** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ It adds a new content element which you can use to create highlighted code snippets on your page. It uses CSS to do the highlighting. .. _Requirements: Requirements ^^^^^^^^^^^^ It uses the PEAR Text Highlighter package from `http://pear.php.net/package/Text\_Highlighter `_ . I chose this package because it can highlight: - CPP - CSS - DTD - HTML - JAVA - JAVASCRIPT - MYSQL - PHP - PERL - PYTHON - RUBY - SQL - XML - DIFF .. _Screenshots: Screenshots ^^^^^^^^^^^ |img-1| *Illustration 1: Optionally add static template and default highlighting css* |img-2| *Illustration 2: Create new text element and choose 'Highlighted text'* |img-3| *Illustration 3: Choose format* |img-4| *Illustration 4: The result* .. _User-manual: User manual ----------- Create a new page content element (text for example) and then change the TYPE to 'Highlighted Text'. The form will change and you will get a 'format' dropdown menu and a field to paste your code into. .. _Reference: Reference ^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _tabWidth: tabWidth """""""" .. container:: table-row Property tabWidth Data type integer Description The amount of spaces used to represent a tab. Default 2 .. _numbering: numbering """"""""" .. container:: table-row Property numbering Data type string Description Accepts three different values: HL\_NUMBERS\_LI instructs the class to number the lines using the
    HTML tag, while HL\_NUMBERS\_TABLE uses a two-column table with the line numbers in the first and the source code in the second column. Setting the value to FALSE turns line numbering off. Default HL\_NUMBERS\_LI .. ###### END~OF~TABLE ###### **example TypoScript constants section:** :: plugin.tx_texthighlighter_pi1.numbering = HL_NUMBERS_LI plugin.tx_texthighlighter_pi1.tabWidth = 2 .. _To-Do-list: To-Do list ---------- Make a nice backend module for cut and paste highlighting code. This could be used to paste highlighted code into a news article for example. |img-5| EXT: Text Highlighter - 4 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. :border: 0 .. :height: 232 .. :id: graphics1 .. :name: graphics1 .. :width: 669 .. |img-2| image:: img-2.png .. :align: left .. :border: 0 .. :height: 603 .. :id: graphics2 .. :name: graphics2 .. :width: 669 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 624 .. :id: graphics3 .. :name: graphics3 .. :width: 736 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :id: graphics4 .. :name: graphics4 .. :width: 100% .. |img-5| image:: img-5.png .. :align: left .. :border: 0 .. :height: 32 .. :id: Graphic1 .. :name: Graphic1 .. :width: 102