plugin:syntaxhighlighter2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:syntaxhighlighter2 [2010-07-05 13:49] – [Known issues] 85.11.35.105 | plugin:syntaxhighlighter2 [2020-06-04 16:33] (current) – StarArmy | ||
---|---|---|---|
Line 7: | Line 7: | ||
type : Action, Syntax | type : Action, Syntax | ||
lastupdate : 2010-07-05 | lastupdate : 2010-07-05 | ||
- | compatible : 2009-02-14 | + | compatible : !Hogfather |
depends | depends | ||
- | conflicts | + | conflicts |
- | similar | + | similar |
- | tags : code, highlight, syntax | + | tags : code, syntaxhighlight, syntax |
- | downloadurl: | + | downloadurl: |
---- | ---- | ||
===== Download and Installation ===== | ===== Download and Installation ===== | ||
- | Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the URL given above. Refer to [[:Plugins]] on how to install plugins manually. | + | :!: **Plugin has been discontinued, |
- | :!: Plugin was updated 2010-07-05 to fix CSS problems in Firefox/ | ||
- | |||
- | The subfolder sxh2 contains a complete (and untouched) distribution of SyntaxHighlighter 2.1.364. | ||
- | |||
- | ===== Syntax and Usage ===== | ||
- | |||
- | Client side syntax highlighter (with copy to clipboard functionality) based on [[plugin: | ||
- | |||
- | * Updated to use version 2.1.364 of [[http:// | ||
- | * Does not use < | ||
- | |||
- | Usage:\\ | ||
- | <code text> | ||
- | <sxh [brush alias][; options for SyntaxHighlighter]> | ||
- | ... code/text ... | ||
- | </ | ||
- | </ | ||
- | |||
- | **//brush alias//** - The brush alias (language) that SyntaxHighlighter should use. Defaults to " | ||
- | \\ | ||
- | **// | ||
- | |||
- | Example: | ||
- | <code text> | ||
- | <sxh php; first-line: 5; highlight: [9, | ||
- | function render($mode, | ||
- | |||
- | if ($mode == ' | ||
- | if (count($data) == 3) { | ||
- | list($syntax, | ||
- | if ($syntax == ' | ||
- | $renderer-> | ||
- | else | ||
- | $renderer-> | ||
- | } | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | </ | ||
- | </ | ||
- | |||
- | ==== Copy to clipboard ==== | ||
- | |||
- | Hover mouse pointer over the code, a toolbar pops up with four buttons, the second is "copy to clipboard" | ||
- | |||
- | Tool tips and dialog texts can be modified but require code changes, see [[http:// | ||
- | |||
- | ===== Plugin structure ===== | ||
- | |||
- | These files and directories are included in the plugin: | ||
- | <code text> | ||
- | syntaxhighlighter2/ | ||
- | |-- action.php | ||
- | |-- sxh2 | ||
- | | |-- LGPLv3.txt | ||
- | | |-- scripts | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | |-- src | ||
- | | | ||
- | | | ||
- | | |-- styles | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | | ||
- | | `-- test.html | ||
- | `-- syntax | ||
- | `-- code.php | ||
- | </ | ||
- | ===== Known issues ===== | ||
- | |||
- | * Does not look good in Mozilla Firefox, looks great in Internet Explorer 8. SyntaxHighlighter examples (tested outside DokuWiki) look like they should in Firefox. The problem seems to be a combination of stylesheets, | ||
- | * **2010-07-05**: | ||
- | * Requires Flash for copy to clipboard functionality. | ||
- | ===== Discussions ===== | ||
- | I installed the plugin as of 2010-06-29, but it doesn' | ||
- | |||
- | --- First of all, have you read "known issues" | ||
- | |||
- | --- 2010-07-05: If the problem was Firefox/ |
plugin/syntaxhighlighter2.1278330599.txt.gz · Last modified: 2010-07-05 13:49 by 85.11.35.105