Cookbook /
Precode - general utility block markup for displaying codes
Summary: General utility block markup for displaying codes with syntax highlighting
Version: 2.3.1-20241027
Prerequisites: PmWiki 2.2.122+, PHP 5.6.40+
Status: Active/Stable
Maintainer: VKrishn
Discussion: Precode-Talk
Precode - general utility block markup for displaying codes
sample1 | sample2 | sample3 | sample4 | sample5 | sample6
Description
Precode - general utility block markup for displaying codes
Notes
Some of the potential uses of Precode
- Long rfc style text can be input and referenced by line.
- Can be used by syntax-highlighting tools like Highlight.js, GeSHi with all its features.
About Precode
Some issues Precode addresses:
- Add line number to preformatted code/text.
- The line counter/number can be reset.
- Choice for list-styles
disc | circle | square | decimal | decimal-leading-zero |
lower-roman | upper-roman | lower-greek | lower-latin | upper-latin |
armenian | georgian | lower-alpha | upper-alpha | none | inherit |
disclosure-open | disclosure-closed - Line numbers can be custom styled.
Installation
Configuration
Usage
- Adapters (included)
- chilli
- geshi
- highlightjs
- prettify
- prismjs
- rainbow
- sourceblock.geshi
- syntaxlove.syntaxhighlighter
Notes
Release notes
See also
- W3c Org
Contributors
Demo:
- Please see links at the beginning of this page. see above
Requirements | ||
Package/Apps | Minimum | Last test |
---|---|---|
Php | 5 >= 5.6.40 | 8.1.6+ |
PmWiki | 2.2.122 | 2.3.37 |
Browser | Most browsers built after 2014 with JavaScript support + CSS2+ |
Files/Download
Changelog
October 27, 2024 ================== Precode v2.3.1 ------------------ -- Add numx:after example. October 23, 2024 ================== Precode v2.3.0 ------------------ -- Update document. October 17, 2024 ================== Precode v2.3.0-beta-2 ---------------------- -- Minor bug fix. -- Add theme in highlightjs. -- Update highlightjs to use v9.13.1. -- Update document. October 16, 2024 ================== Precode v2.3.0-beta-1 ---------------------- -- Add defaults. -- Clean/redo @suppression,isset() use. -- Add theme,lang in rainbow,chilli,geshi,syntaxlove. -- Fix div wrap in sourceblock.geshi, use -headw -- Code cleaned. February 13, 2023 ================== Precode v2.2.1 ------------------ -- Add list-styles 'disclosure-open, disclosure-closed'. -- Code cleaned. January 16, 2023 ================== Precode v2.2.0 ------------------ -- Make compatible with php 7.2x. -- Make compatible with php 8.0.x. -- Update adapter rainbow to v2.1.7. -- Upgrade adapter.sourceblock.geshi. -- Minor bug fix. March 14, 2014 ================== Precode v2.1.0 ------------------ -- Make compatible with php 5.5x. -- Add adapters rainbow, prismjs. -- Minor bug fix. March 15, 2013 ================== Precode v2.0.5 ------------------ -- Minor bug fix. -- Maintenance release. March 05, 2013 ================== Precode v2.0.4 ------------------ -- Minor bug fix. -- Maintenance release. February 23, 2013 ================== Precode v2.0.3 ------------------ -- Adapter.prettify lang class fix. -- Minor bug fix. -- Updated test files. January 16, 2013 ================== Precode v2.0.2 ------------------ -- Cleaned presenter js. -- Combined/minified js files. -- Added variable to toggle highlighter/presenter. -- Updated adapters and tests. August 14, 2012 ================== Precode v2.0.1 ------------------ -- Minor bug fix. -- Refined adapters. July 28, 2012 ================== Precode v2.0.1-beta-3 ---------------------- -- Minor bug fix. -- Refined adapters. July 25, 2012 ================== Precode v2.0.1-beta-2 ---------------------- -- Minor bug fix. -- Refined adapters. July 21, 2012 ================== Precode v2.0.1-beta-1 ---------------------- -- Minor bug fix. -- Improved classreset. -- Improved js linenum(Precode). -- Addon js Precode.Highlight. -- Addon js Precode.CodePresenter. July 14, 2012 ================== Precode v2.0.0 ------------------ -- Version jump. -- Improved classreset. July 12, 2012 ================== Precode v1.2.0 ------------------ -- Minor bug fix. -- Add step (increment by) for line numbers. -- Updated document. -- Add suffix and prefix to linenum. -- Add limit to linereset. -- Add classreset. July 10, 2012 ================== Precode v1.1.0 ------------------ -- Minor bug fix. -- Added linenum.js (full source). -- Compressed js code. July 9, 2012 ================== Precode v1.0.0 ------------------ -- Initial release.
See also
- Cookbook /
- Ape Embed videos, maps, documents, and more in wiki pages (Stable)
- Beautifier Perform syntax highlighting for source code displayed on wiki pages
- CodeMirror An enhanced page editor for PmWiki (Stable)
- Gists Markup to allow easy embedding of syntax-highlighted github gists (active)
- PITS The PmWiki Issue Tracking System (Beta)
- PmPygment Display code highlighting using Python pygment (Stable)
- SourceBlock Source code syntax highlighter for PmWiki 2.x using GeSHi (Stable)
- Syntaxlove Syntax highlighting with good look and cool JavaScript-effects
- ZCode Extract and highlight source code files from 7z, TAR, ZIP, or RAR archives (Experimental)
Author
- V.Krishn
Comments
See discussion at Precode-Talk
User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.