Update README.md

This commit is contained in:
dalu 2020-01-19 14:19:56 +01:00 committed by GitHub
parent 48078d670c
commit 90e289d285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

302
README.md
View File

@ -1,315 +1,17 @@
=== Crayon Syntax Highlighter === === Crayon Syntax Highlighter ===
Contributors: akarmenia
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=AW99EMEPQ4CFE&lc=AU&item_name=Crayon%20Syntax%20Highlighter%20Donation&item_number=crayon%2ddonate&currency_code=AUD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
License: GPLv2 or later
Tags: syntax highlighter, syntax, highlighter, highlighting, crayon, code highlighter, bbpress
Requires at least: 3.0
Tested up to: 4.2.0
Stable tag: trunk
Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, or post text. Syntax Highlighter supporting multiple languages, themes, fonts, highlighting from a URL, or post text.
This is a fork with applied PRs and bumped semantic versioning.
== Description == == Description ==
A Syntax Highlighter built in PHP and jQuery that supports customizable languages and themes. A Syntax Highlighter built in PHP and jQuery that supports customizable languages and themes.
It can highlight from a URL, or Wordpress post text. Crayon makes it easy to manage Language files and define It can highlight from a URL, or Wordpress post text. Crayon makes it easy to manage Language files and define
custom language elements with regular expressions. custom language elements with regular expressions.
It also supports some neat features like:
* Integrated <a href="http://aramk.com/blog/2012/12/27/crayon-theme-editor/" target="_blank">Theme Editor!</a>
* <a href="http://aramk.com/blog/2012/03/25/crayon-tag-editor/" target="_blank">Tag Editor</a> in both Visual & HTML editors
* Toggled plain code
* Toggled line numbers
* Copy/paste code
* Open code in a new window (popup)
* Line wrapping
* Code expanding
* Minimizing
* bbPress 2 support
* <a href="http://aramk.com/blog/2012/09/26/converting-legacy-tags-to-pre/" target="_blank">Converting legacy code in blog posts/comments to &lt;pre&gt;</a>
* Remote request caching
* <a href="http://aramk.com/blog/2011/12/25/mixed-language-highlighting-in-crayon" target="_blank">Mixed Language Highlighting</a> in a single Crayon
* <a href="http://aramk.com/blog/2011/12/27/mini-tags-in-crayon/" target="_blank">Mini Tags</a> like [php][/php]
* <a href="http://aramk.com/blog/2012/03/07/inline-crayons/" target="_blank">Inline Tags</a> floating in sentences
* Crayons in comments
* &#96;Backquotes&#96; become &lt;code&gt;
* &lt;pre&gt; tag support, option to use <code>setting-value</code> in the class attribute
* Valid HTML 5 markup
* <a href="http://aramk.com/blog/2012/03/25/crayon-tag-editor/" target="_blank">Visual & HTML editor compatible</a>
* Mobile/touchscreen device detection
* Mouse event interaction (showing plain code on double click, toolbar on mouseover)
* Tab sizes
* Code title
* Toggled toolbar
* Retina buttons
* Striped lines
* Line marking (for important lines)
* <a href="http://aramk.com/blog/2012/09/02/line-ranges-in-crayon/" target="_blank">Line ranges (showing only parts of the code)</a>
* Starting line number (default is 1)
* File extension detection
* Live Preview in settings
* Dimensions, margins, alignment, font-size, line-height, float
* Extensive error logging
**Links**
* <a href="https://github.com/aramk/crayon-syntax-highlighter" target="_blank">Beta Releases</a>
* <a href="http://aramk.com/blog/2012/12/27/crayon-theme-editor/" target="_blank">Themes Demo</a>
* <a href="https://github.com/aramk/crayon-syntax-highlighter" target="_blank">GitHub Project</a>
**Contributions** **Contributions**
There are many ways you can help! Open for PRs. Please see the original repository for credits.
* Make a Theme and share
* Add support for your favourite <a href="http://aramk.com/blog/2011/09/23/crayon-language-file-specification/" target="_blank">Language</a>
* Write a post about your pastel experiences and share
* <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=AW99EMEPQ4CFE&lc=AU&item_name=Crayon%20Syntax%20Highlighter%20Donation&item_number=crayon%2ddonate&currency_code=AUD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted" target="_blank">Donate</a> to the project
**Supported Languages**
Languages are defined in language files using Regular Expressions to capture elements.
See the <a href="http://aramk.com/blog/2011/09/23/crayon-language-file-specification/" target="_blank">Crayon Language File Specification</a> to learn how to make your own.
* Default Language (one size fits all, highlights generic code)
* C1 (thanks to <a href="http://oparin.info/" target="_blank">Oparin Pavel</a>)
* ABAP
* ActionScript
* AmigaDOS (thanks to <a href="http://www.amigalog.com/" target="_blank">amigalog.com</a>)
* Apache
* AppleScript
* Arduino
* Assembly (x86)
* AutoIt
* C
* C#
* C++
* Clojure (thanks to <a href="https://github.com/mberndtgen" target="_blank"></a>)
* CoffeeScript (thanks to <a href="http://firn.jp/crayon-coffeescript" target="_blank">Dai Akatsuka</a>)
* CSS
* Delphi/Pascal (thanks to <a href="http://squashbrain.com/" target="_blank">Chris McClenny</a>)
* Delphi Web Script (thanks to <a href="http://www.smartmobilestudio.com" target="_blank">smartmobilestudio</a>)
* Diff (thanks to <a href="http://omniavin.co/post/262" target="_blank">omniavin</a>)
* Erlang (thanks to <a href="http://netroid.de/" target="_blank">Daniel</a>)
* Fabric Engine KL (thanks to <a href="https://github.com/AndrewHazelden" target="_blank">Andrew Hazelden</a>)
* Go
* Haskell
* HTML (XML/XHTML)
* INI
* Lisp
* Lua
* Maya MEL (thanks to <a href="https://github.com/AndrewHazelden" target="_blank">Andrew Hazelden</a>)
* Microsoft Registry (thanks to <a href="http://techexplored.com/2012/03/21/crayon-syntax-highlighter-reg-support/" target="_blank">techexplored.com</a>)
* MIVA Script
* Monkey (thanks to <a href="https://github.com/devolonter" target="_blank">Devolonter</a>)
* MS-DOS (thanks to <a href="http://www.amigalog.com/?p=334" target="_blank">http://www.amigalog.com/?p=334</a>)
* MySQL (thanks to <a href="http://assemblysys.com/" target="_blank">AssemblySys.com</a> and <a href="http://ansas-meyer.de/" target="_blank">ansas-meyer.de</a>)
* Java
* JavaScript
* Objective-C
* Papyrus
* Perl
* PHP
* PL/SQL
* PostgreSQL (thanks to <a href="http://bitorchestra.com/" target="_blank">Bitorchestra</a>)
* PowerShell
* Python
* R
* Ruby
* Rust (thanks to <a href="https://github.com/Stibbons" target="_blank">Stibbons</a>)
* Scheme (thanks to <a href="https://github.com/harry75369" target="_blank">Harry75369</a>)
* Shell (Unix)
* Swift (thanks to <a href="https://github.com/weyhan" target="_blank">weyhan</a>)
* Transact-SQL
* TeX
* Vim
* Visual Basic
* Visual Basic .NET (thanks to <a href="https://github.com/OomJan/crayon-lang-vbnet" target="_blank">Kevin Gardthausen</a>)
* YAML
* ZSH (thanks to <a href="https://github.com/Stibbons" target="_blank">Stibbons</a>)
* Others will be added when requested
**International Languages**
* Arabic (thanks to <a href="http://djennadhamza.eb2a.com/" target="_blank">Djennad Hamza</a>)
* Chinese Simplified (thanks to <a href="http://smerpup.com/" target="_blank">Dezhi Liu</a> & <a href="http://neverno.me/" target="_blank">Jash Yin</a>)
* Chinese Traditional (thanks to <a href="http://www.arefly.com/" target="_blank">Arefly</a>)
* Dutch (thanks to <a href="https://twitter.com/RobinRoelofsen" target="_blank">Robin Roelofsen</a> & <a href="https://twitter.com/#!/chilionsnoek" target="_blank">Chilion Snoek</a>)
* Finnish (thanks to <a href="https://github.com/vahalan" target="_blank">vahalan</a>)
* French (thanks to <a href="https://vhf.github.io" target="_blank">Victor Felder</a>)
* German (thanks to <a href="http://www.technologyblog.de/" target="_blank">Stephan Knau&szlig;</a>)
* Italian (thanks to <a href="http://www.federicobellucci.net/" target="_blank">Federico Bellucci</a>)
* Japanese (thanks to <a href="https://twitter.com/#!/west_323" target="_blank">@west_323</a>)
* Korean (thanks to <a href="https://github.com/dokenzy" target="_blank">dokenzy</a>)
* Lithuanian (thanks to Vincent G)
* Norwegian (thanks to <a href="http://www.jackalworks.com/blogg" target="_blank">Jackalworks</a>)
* Persian (thanks to MahdiY)
* Polish (thanks to <a href="https://github.com/toszcze" target="_blank">Bartosz Romanowski</a>, <a href="http://rob006.net/" target="_blank">Robert Korulczyk</a>)
* Portuguese (thanks to <a href="http://www.adonai.eti.br" target="_blank">Adonai S. Canez</a>)
* Russian (thanks to <a href="http://simplelib.com" target="_blank">Minimus</a> & <a href="http://atlocal.net/" target="_blank">Di_Skyer</a>)
* Slovak (thanks to Branco, <a href="https://twitter.com/#!/webhostgeeks" target="_blank">webhostgeeks/</a>)
* Slovenian (thanks to Jan Su&#353;nik, <a href="http://jodlajodla.si/" target="_blank">http://jodlajodla.si/</a>)
* Spanish (thanks to <a href="http://www.hbravo.com/" target="_blank">Hermann Bravo</a>)
* Tamil (thanks to <a href="http://kks21199.mrgoogleglass.com/" target="_blank">KKS21199</a>)
* Turkish (thanks to <a href="http://hakanertr.wordpress.com" target="_blank">Hakan</a>)
* Ukrainian (thanks to <a href="http://getvoip.com/blog" target="_blank">Michael Yunat</a>)
* Help from translators at improving/adding to this list greatly appreciated!
**Articles**
These are helpful for discovering new features.
* <a href="http://aramk.com/blog/2012/09/26/internal-post-management-crayon/" target="_blank">Internal Post Management in Crayon</a>
* <a href="http://aramk.com/blog/2012/09/26/converting-legacy-tags-to-pre/" target="_blank">Converting Legacy Tags to &lt;pre&gt;</a>
* <a href="http://aramk.com/blog/2012/09/08/crayon-with-bbpress/" target="_blank">Crayon with bbPress</a>
* <a href="http://aramk.com/blog/2012/09/02/line-ranges-in-crayon/" target="_blank">Line Ranges in Crayon</a>
* <a href="http://aramk.com/blog/2012/03/25/crayon-tag-editor/" target="_blank">Crayon Tag Editor</a>
* <a href="http://aramk.com/blog/2011/12/25/mixed-language-highlighting-in-crayon/" target="_blank">Mixed Language Highlighting in Crayon</a>
* <a href="http://aramk.com/blog/2011/12/27/mini-tags-in-crayon/" target="_blank">Mini Tags And Plain Tags In Crayon</a>
* <a href="http://aramk.com/blog/2012/03/07/inline-crayons/" target="_blank">Inline Tags</a>
* <a href="http://aramk.com/blog/2012/01/07/enqueuing-themes-and-fonts-in-crayon/" target="_blank">Enqueuing Themes and Fonts in Crayon</a>
**The Press**
A handful of articles from others written about Crayon, thanks guys!
* <a href="http://thedigitalhippies.com/digital/crayon-syntax-highlighter-plugin-theme-color-previews-demo/" target="_blank">Crayon Syntax Highlighter Plugin Theme Color Previews</a>
* <a href="http://www.webworkgarage.com/2013/07/using-crayon-syntax-highlighter-wordpress-plugin-to-post-code-snippets-on-your-blog/" target="_blank">Using Crayon Syntax Highlighter WordPress plugin to post code snippets on your blog</a>
* <a href="http://www.jjpro.net/2013/01/13/how-to-post-source-code-on-wordpress-2/" target="_blank">How to post source code on WordPress</a>
* <a href="http://www.emanueleferonato.com/2013/02/01/syntax-highlighter-switched-to-crayon/" target="_blank">Syntax highlighter switched to Crayon</a>
* <a href="http://www.wordpressthemeshq.net/5-best-syntax-highlighter-plugins-for-wordpress/" target="_blank">5 Best Syntax Highlighter Plugins for WordPress</a>
* <a href="http://amecylia.com/how-to-post-source-code-wordpress/" target="_blank">How To Post Source Code In Wordpress</a>
* <a href="http://icrunched.co/top-5-syntax-highlighter-wordpress-plugins/" target="_blank">Top 5 Syntax Highlighter WordPress Plugins</a>
* <a href="http://themesplugins.com/wordpress-Plugin/add-php-java-html-codes-posts-pages/" target="_blank">Crayon Syntax Highlighter <20> Plugin</a>
* <a href="http://bbpress.org/forums/topic/state-of-syntax-highlighter-support-in-bbpress-2/" target="_blank">State of syntax highlighter support in bbPress 2</a>
* <a href="http://www.techbrunch.fr/informations/plugin-wordpress-afficher-code-source/" target="_blank">The ultimate plugin for displaying code in WordPress (French)</a>
* <a href="http://www.trynull.com/2012/06/15/finally-wordpress-code-syntax-highlighting-that-works/" target="_blank">Finally!, A WordPress code syntax highlighting that works</a>
* <a href="http://selfpwnt.com/crayon-syntax-highlighter-and-its-studly-author/" target="_blank">Crayon Syntax Highlighter (and its studly author)</a>
* <a href="http://bit51.com/add-code-to-your-wordpress-posts-with-crayon-syntax-highlighter/" target="_blank">Add Code To Your WordPress Posts With Crayon Syntax Highlighter</a>
* <a href="http://www.wpsquare.com/syntax-highlighter-wordpress-plugins/" target="_blank">15 Best Syntax Highlighter WordPress Plugins</a>
* <a href="http://www.doitwithwp.com/displaying-code-in-wordpress-with-crayon-syntax-highlighter/" target="_blank">Displaying Code in WordPress with Crayon </a>
* <a href="http://blog.boxedpages.net/2012/03/15/abap-syntaxhighlighting-in-wordpress/" target="_blank">ABAP Syntax Highlighting in WordPress (German)</a>
* <a href="http://jstips.org/2012/04/23/crayon-syntax-highlighter-plugin/" target="_blank">Crayon Syntax Highlighter plugin</a>
* <a href="http://infodrug.ru/wordpress/kak-krasivo-vstavit-programmnyj-kod-v-wordpress-podsvetka-sintaksisa.html" target="_blank">Crayon Syntax Highlighter (Russian)</a>
* <a href="http://n-wp.ru/11513" target="_blank">Crayon Syntax Highlighter (also Russian)</a>
* <a href="http://kampungtoys.com/tag/crayon-syntax-highlighter/" target="_blank">How To Post Source Code</a>
* http://wp-best-practices.asdf573189.com/home/good-plugins/crayon-syntax-highlighter/
* http://www.wplover.com/2155/crayon-syntax-highlighter-plugin/
* http://www.htmlandphp.com/scripts/crayon-syntax-highlighter.html
**Donations**
Thanks to all those who donate to the project:
* Joe Sabate, Spain
* Kai Chen, Canada
* Chen Kaiyuan, China
* Kamarul Musa, Malaysia
* WallyWare, Inc., (https://pi-plates.com), USA
* Stéphane Rochat, (http://stephanerochat.ch), Switzerland
* Brennan Hale-Matthews, Canada
* Robert Giczewski, (http://www.lazydaemon.de/), Germany
* Hoke Media, (http://hoke.media/), USA
* Matthew Hood, Australia
* Brian Williams, USA
* Christian Martens, (http://insgesamt.net/), Germany
* Nilesh Govindrajan, (http://nileshgr.com/), India
* ZengChun Yang, China
* Alan Kaplan, (http://www.akaplan.com/blog), USA
* Christopher Yarbrough, (http://chrisyarbrough.com/), Germany
* Johann Weiher, (http://codequartett.de/), Germany
* Samuel Deering, Australia
* Billiard Greg, (http://billiardgreg.com/), USA
* Performance Simulations, (http://www.performancesimulations.com/), USA
* Lindsay Ross, (http://gravelrash.com), New Zealand
* Ruperto Coronado Muñoz, Mexico
* Stefan Onderka, (http://www.onderka.com), Germany
* Peter Kellner, (http://peterkellner.net), USA
* Open Hardware Design Group LLC, (http://opensourcehardwaregroup.com/), USA
* Helen McManus, (http://invisiblepixels.org/InvisibleWords/), Netherlands
* Thomas Fee, UK
* Julie Knowles, (http://knowlesfamily.com/), USA
* Peter Kriegel, (http://www.powershell-group.eu/), Germany
* Geo My WP, (http://geomywp.com), USA
* Raffael Vogler, Germany
* Erdal Cicek, Turkey
* Cloud-VPS, Poland
* Łukasz Bereza, Poland
* Laurence Scotford, UK
* Goretity Árpád László, (http://h2co3.org/blog), Hungary
* AdsProvider, USA
* Alicia Ramirez, (http://aliciaramirez.com/), Canada
* William Eisert, USA
* Inappix Development, (http://www.inappix.com/), Switzerland
* Stephen Sant, (http://thesantfamily.net/), UK
* David Rodriguez, (http://davidarodriguez.com/), USA
* Chris Moore, (http://moorecreativeideas.com/), USA
* Sohail Ahmed, (http://sohail.io.com/), USA
* Vanessa Garcia Espin, Spain
* Samad Malik, (http://samadmalik.com/), USA
* Wabbit Wanch Design, (http://www.wabbitwanch.com/), Canada
* Inopox Ltd, (http://inopox.com/), Cyprus
* Kho Minh Vi, (http://khominhvi.com/), UK
* Ivan Churakov, Russia
* Carla Macías González, Mexico
* Saulius Stonys, Lithuania
* Konstantin Sabel, Germany
* Luigi Massa, (http://bwlab.it/), Italy
* Anthony Steiner, (http://steinerd.com/), USA
* Alexander Harvey, (http://alexharvey.eu/), UK
* Minhazul Haque Shawon, Cyprus
* Raam Dev, (http://raamdev.com/), USA
* Scot Ranney, (http://scotsscripts.com/), USA
* Nico Hartung, (http://www.loggn.de/), Germany
* Joseph DeVenuta, USA
* Iván Prego García, Spain
* Johannes Luijten, (http://www.tweaking4all.com/, http://www.weethet.nl/), USA
* Jack Fruh, (http://basementjack.com/), USA
* Ross Barbieri, USA
* Will, Simple Phishing Toolkit (http://www.sptoolkit.com/), USA
* Tricia Aanderud, USA
* Tarek Sakr, (http://centrivision.com/), USA
* Jeff Benshetler, (http://branchpoint.net/), USA
* Oldrich Strachota, (http://www.strachota.net/), Czech Republic
* Dividend Ninja, (http://dividendninja.com/), Canada
* Chris Wiegman, (http://bit51.com/), USA
* Sven Meier, (http://www.codesix.net/), Germany
* Christy Wiggins, (http://www.jinxyisms.com/), USA
* eSnipe, Inc. (http://esnipe.com/), USA (again!)
* Aliseya Wright, (http://blog.xoxothemes.com/), USA
* Jeremy Worboys (http://complexcompulsions.com/), Australia
* Steve McGough, Spider Creations, LLC. (http://spidercreations.net/), USA
* eSnipe, Inc. (http://esnipe.com/), USA
* Gerald Drouillard (http://www.drouillard.biz/), USA
* Greg Pettit (http://blog.monkey-house.ca/), Canada
* Waimanu Solutions (http://daveblog.waimanu.web44.net/), USA
* Andrew McDonnell (http://blog.oldcomputerjunk.net/), Australia
* Perry Bonewell (http://pointatthemoon.co.uk/), United Kingdom
* Nick Weisser (http://www.openstream.ch/), Switzerland
== Installation ==
* Download the .zip of the plugin and extract the contents.
* Upload it to the Wordpress plugin directory and activate the plugin.
* Even easier, just go to <strong>Plugins > Add New</strong> and search for "Crayon".
* You can change settings and view help under <strong>Settings > Crayon</strong> in the Wordpress Admin.
* Make sure your theme either manually specifies jQuery, or uses the version shipped with Wordpress (recommended). You should NOT print out jQuery manually in the header as a script tag. <a href="http://wordpress.stackexchange.com/questions/1535/how-to-dequeue-a-script" target="_blank">Enqueueing it in Wordpresss</a> will prevent duplicate jQuery includes (also bad) and will allow other scripts to be placed AFTER jQuery in the head tag so they can use it. If you're uncertain, just let Wordpress handle it and remove any jQuery script tags you find in your theme's header.php.
== Frequently Asked Questions ==
Please see the <a href="https://github.com/aramk/crayon-syntax-highlighter" target="_blank">documentation</a> for all the details.
= Support =
Contact me at http://twitter.com/crayonsyntax or crayon.syntax@gmail.com.
== Screenshots ==
1. Classic theme.
2. Twilight theme.
3. Mixed Language Highlighting.
4. Tag Editor.
5. Theme Editor.
== Changelog == == Changelog ==