NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11383 for general documentation changes for release 1.1.5. Use Item9693 for docu changes for release 2.0.

Item8185: Update DpSyntaxHighlighterPlugin to use latest version (2.0.320) of SyntaxHighlighter

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Enhancement Closed Extension DpSyntaxHighlighterPlugin Main.AndrewJones
The newer version of the SyntaxHighlighter? includes support for copying code text again (broken by Flash 10?) It also has a slightly different look and feel. Attached is a diff of my changes to the DpSyntaxHighlighterPlugin after upgrading the code. The scripts and styles folders just need to be copied from the release and pasted to the /path/to/Foswiki/pub/System/dp.SyntaxHighlighter/ folder.

New options for CODE blocks
Example Description
nowrap="on" Prevents line wrapping
ruler="on" Adds a line character ruler to the top
smart-tabs="on" Semi-intelligent tabbing (Demo)
tab-size="value" Set the tab size for tab expansion
highlight="1,2,3" Highlight specific lines of code

New options for WebPreferences
Example Description
DPSYNTAXHIGHLIGHTERPLUGIN_THEME = Default The theme to use for code highlighting - several are included with SyntaxHighlighter?
DPSYNTAXHIGHLIGHTERPLUGIN_HIDE_ABOUT = ON Hides the "About" button if enabled.
DPSYNTAXHIGHLIGHTERPLUGIN_HIDE_PRINT = ON Hides the "Print" button if enabled.
DPSYNTAXHIGHLIGHTERPLUGIN_SPACEWIDTH = 8 Number of pixels to use for a space when expanding tabs. Normally discovered through javascript but may be incorrect depending on the wiki skin. 8 is a good value for PatternSkin in my environment.

-- JeffVStein - 22 Jun 2009

Sorry I didn't see this sooner.

I didn't want to update to version 2 as it had a weird license ("Donationware"), but it seems it is not under LGPL3, which I think is an acceptable open source license.

Thanks for the patch and the docs.

I will check this in in the near future.

-- AndrewJones - 05 Nov 2009

I have checked this in and uploaded a new version.

Thanks for your contribution. By the way, if you have other contributions you might want to request access to SVN? Foswiki is very open to new developers. See RequestAccessToSubversion for more info.

-- AndrewJones - 08 Nov 2009
 

ItemTemplate edit

Summary Update DpSyntaxHighlighterPlugin to use latest version (2.0.320) of SyntaxHighlighter?
ReportedBy Foswiki:Main.JeffVStein
Codebase trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component DpSyntaxHighlighterPlugin
Priority Enhancement
CurrentState Closed
WaitingFor AndrewJones
Checkins Foswikirev:5458 Foswikirev:5459
TargetRelease n/a
ReleasedIn
Topic attachments
I Attachment Action Size Date Who Comment
dppatch.diffdiff dppatch.diff manage 5.9 K 22 Jun 2009 - 20:06 JeffVStein Updated diff of my changes against trunk (Fixed issues with having the wrong lang names vs. the SyntaxHighlighter? values)
Topic revision: r5 - 08 Nov 2009 - 18:37:59 - AndrewJones
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads