SyntaxHighlighter outdated

40 views
Skip to first unread message

Glantucan

unread,
Aug 14, 2010, 9:04:50 PM8/14/10
to TiddlyWiki
First of all, thanks all for the support you are giving to this
awesome tool. I just started using it a week ago and I'm loving it.

I found the former plugin to work quite well in genral but the
different brushes are quite oudated indeed, though there is an up to
date version here: http://alexgorbatchev.com/SyntaxHighlighter/

I'm not a javascript guru myself (not even a newbe) so I wonder
whether there is an easy way to update the TW plugin, or if there is
someone actually using it.

Thanks in advance

Have fun ;)

PMario

unread,
Aug 17, 2010, 10:13:23 AM8/17/10
to TiddlyWiki
Have a look at: syntaxhighlighter space [1]
The status is erxperimental, because, if you use expert mode (disabled
by default) a vanilla tw can't render the new code. So, there is no
fallback yet. If you use the default configuration everything should
be fine.

I did test the basics. But any feedback would be welcome.
And it would be interesting if you describe your usecase. Which
languages (brushes), do you want to highlight.

text, css, js, xml are included by default.

to use it, import all tiddlers tagged "syntax" or include
syntaxhighlighter space into your space.

Download [2]

regards Mario
[1] http://syntaxhighlighter.tiddlyspace.com/#SyntaxHighlighterPlugin3Info
[2] http://syntaxhighlighter.tiddlyspace.com/?download=TWHighlightSyntax.html

Glantucan

unread,
Aug 17, 2010, 9:57:08 PM8/17/10
to TiddlyWiki
Wow!

That was fast :)

Thanks man!

I will check it out tomorrow.
About brushes I would really apreciate actionscript 3

I understand that at the moment the old way is not available. I mean:
<code as3>
// some as3 code
</code>



PMario

unread,
Aug 18, 2010, 5:07:55 AM8/18/10
to TiddlyWiki
It would be possible, but I am not sure if it isn't a TiddlyWiki only
solution. Because the new 3.0 syntax to render it, would be

<code class="brush:as3">
// your code
</code>

What do you/others think about this?

-m



Glantucan

unread,
Aug 18, 2010, 6:28:27 PM8/18/10
to TiddlyWiki
BTW I neither know what a vanilla tw is, though I searched for it.

Eric Shulman

unread,
Aug 18, 2010, 8:33:29 PM8/18/10
to TiddlyWiki
> BTW I neither know what a vanilla tw is, though I searched for it.

"vanilla" is a slang term. It means the "plain flavor"... without any
extra add-ons, plugins, scripts, etc.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

PMario

unread,
Aug 19, 2010, 10:26:40 AM8/19/10
to TiddlyWiki
On Aug 19, 12:28 am, Glantucan <glantu...@gmail.com> wrote:
> BTW I neither know what a vanilla tw is, though I searched for it.
sry for the confusion.

If you tested it, it would be really nice to get your feedback, the
good and the bad.

new syntax?
<code class="brush:as3">
// your code
</code>

What do you/others think about this?

It would be relatively easy to implement this, but existing tiddlers
would need some search/replace. What do actual users (if there a some
listening) of the version 1.5 think about this?

Without any feedback I'll do it my way :)
@Glantucan: "First come, first served."

regards Mario

PMario

unread,
Aug 22, 2010, 6:55:30 PM8/22/10
to TiddlyWiki
There is a new version now. [1]
Expert mode is different now. It makes global changes with
config.options. It is not that flexible as the older version. But
we'll see.

<code class="brush:as3">
// your code
</code>
works now.

The macro <<highlightSyntax>> is still there it can be used if you
want to highlight tw inline html
=====
<html>
<pre class="brush:pascal">
// your code here
</pre>
<html>
<<highlightSyntax>>
=====
If you need your own brushes:
*download the SyntaxHighlighter source [1]
*copy your brush.js file into a tiddler
*name it ShBrushXx.js
*add the following 3 lines at the top of the tiddler
/***
|Requires|ShCore.js|
***/

*tag it systemConfig !!!!!!!
*save and reload.

have fun!
mario

[1] http://syntaxhighlighter.tiddlyspace.com/
[2] http://alexgorbatchev.com/SyntaxHighlighter/download/
Reply all
Reply to author
Forward
0 new messages