Adding editing commands to Swiki
Lukas Renggli
renggli at student.unibe.ch
Sat Mar 6 23:05:02 UTC 2004
Hi Vince,
> possible to add custom editing commands? I was thinking sepcifically
> replacing some smileys with images: :) becomes a happy face, :( a
> frown face, :'( a crying face, etc. Is it something that I can do?
in SmallWiki this could be easily done by subclassing
SWVisitorRendererHtml and overriding the method #acceptText: with
something like:
SWVisitorRendererHtmlSmiley>>acceptText: aText
| | stream |
stream := aText text readStream.
[ stream atEnd ] whileFalse: [
html text: (stream upToAll: ':)').
stream atEnd ifFalse: [
html image: '/smileys/smile.gif'.
html inputStream skip: 2 ] ]
I haven't tested the above code and it does only support one kind of
smiley, but I'm sure that a more complete solution can be implemented
within no time.
Cheers,
Lukas
--
Lukas Renggli
http://renggli.freezope.org
More information about the Squeak-dev
mailing list
|