I did it and it works fine! Thanks.
But... I changed a LineFormater, that means that my <em> </em> can not
extend more than one paragraph. What about something like this:
�line one
line two
line three�
Should I try with PageFormater? But the setting showFormater of a swiki
is supposed to be a LineFormatter, right?
Any suggestions?
Regards,
Casco
"Jochen F. Rick" wrote:
>
> Hi!
>
> You are correct. There is no way to do this with the SwikiBrowser.
> Formatting is done with the various formatters than can be edited with
> the Squeak system browser. However, which formatters are used depends on
> the settings of the Swiki. For instance, check out ref's settings.
> You could for instance change showFormatter from (LineFormatter
> showFormatter) to (LineFormatter cascoShowFormatter) and then create a
> class method in LineFormatter like this.
>
> cascoShowFormatter
> | instance textFormatter listFormatter |
>
> instance _ self new.
> instance storeID: #showFormatter.
> instance convertToCrlf: true.
> textFormatter _ PageFormatter new.
> textFormatter
> initialize;
> addInternalLinks;
> addTagIntegrity;
> addShowSpecialCharacters;
> addUploadLinks
> addAction: [:text :request :response :shelf :book :page | '<em>',
> (textFormatter format: text request: request response: response shelf: shelf book:
>book page: page), '</em>'] from: '�' to: '�'.
> instance addExceptionFrom: '<html>' to: '</html>' using: [:text
> :request :response :shelf :book :page | TextFormatter crToCrlf: text].
> instance addExceptionFrom: '<HTML>' to: '</HTML>' using: [:text
> :request :response :shelf :book :page | TextFormatter crToCrlf: text].
> instance addFormatter: (IdFormatter break) at: $_.
> instance addFormatter: (IdFormatter anchor) at: $@.
> instance addFormatter: (IdFormatter append) at: $+.
> instance addFormatter: (IdFormatter heading: textFormatter) at: $!.
> listFormatter _ IdFormatter list: textFormatter.
> instance addFormatter: (listFormatter) at: $-.
> instance addFormatter: (listFormatter) at: $#.
> instance addFormatter: (IdFormatter table: textFormatter) at: $|.
> instance addFormatter: (IdFormatter preformatted: textFormatter)
> at: $=.
> instance addDefaultFormatter: (IdFormatter text: textFormatter).
> ^instance
>
> Peace and Luck!
>
> Je77
>
> On Fri, Jun 01, 2001 at 05:06:51PM +0200, Alejandro Fernandez wrote:
> > Hi all,
> > sorry for this basic question, but after some time playing with the
> > swiki browser and the Smalltalk browser I could not figure out how to do
> > it. I simply want to add a mapping from, let's say, �text� to
> > <em>text</em>. It looks that I will have to modify PageFormater with a
> > method like in this case:
> >
> > addInternalLinks
> > self addAction: [:text :request :response :shelf :book :page | self
> > internalLinks: text request: request response: response shelf: shelf
> > book: book page: page] from: '*' to: '*'.
> > self addMappingFrom: '&*' to: '*'
> >
> > however, I am sure there must be a way to define such an Action from the
> > swiki browser. I cannot find it.
> > Could you give me some advice?
> >
> > Regards,
> > casco
> >
> > --
> > Alejandro Fernandez
> > GMD - German National Research Center for Information Technology
> > IPSI - Integrated Publication and Information Systems
> > Dolivostrasse 15 - (64293) Darmstadt - Germany
> > Phone: +49 6151 869-4837
> > Fax: +49 6151 869-963
> > Web: http://casco.swiki.net
--
Alejandro Fernandez
GMD - German National Research Center for Information Technology
IPSI - Integrated Publication and Information Systems
Dolivostrasse 15 - (64293) Darmstadt - Germany
Phone: +49 6151 869-4837
Fax: +49 6151 869-963
Web: http://casco.swiki.net