'From Squeak3.2alpha of 3 October 2001 [latest update: #4418] on 4 October 2001 at 9:32:01 am'!
!LineFormatter class methodsFor: 'instance creation' stamp: 'dsp 10/3/2001 15:43'!
showFormatter
| instance textFormatter listFormatter |
instance _ self new.
instance storeID: #showFormatter.
instance convertToCrlf: true.
textFormatter _ PageFormatter new.
textFormatter
initialize;
addInternalLinks;
addTagIntegrity;
addShowSpecialCharacters;
addUploadLinks.
instance addExceptionFrom: '' to: '' using: [:text :request :response :shelf :book :page | TextFormatter crToCrlf: text].
instance addExceptionFrom: '' to: '' using: [:text :request :response :shelf :book :page | TextFormatter crToCrlf: text].
instance addExceptionFrom: '' to: '' using: [:text :request :response :shelf :book :page |[(Compiler evaluate: (TextFormatter crToCrlf: text)) valueWithArguments: (Array with: request)] on: Error do:[:ex| 'Error:', ex messageText]].
instance addFormatter: (IdFormatter break) at: $_.
instance addFormatter: (IdFormatter anchor) at: $@.
instance addFormatter: (IdFormatter append) 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! !
!PageFormatter methodsFor: 'functionality' stamp: 'dsp 10/3/2001 15:04'!
addEditHtml
self addAction: [:text :request :response :shelf :book :page | '<html>', (TextFormatter encodeToXmlCrlf: text), '</html>']from: '' to: ''.
self addAction: [:text :request :response :shelf :book :page | '<HTML>', (TextFormatter encodeToXmlCrlf: text), '</HTML>']from: '' to: ''.
self addAction: [:text :request :response :shelf :book :page | '<st>', (TextFormatter encodeToXmlCrlf: text), '</st>']from: '' to: ''! !
!PageFormatter methodsFor: 'functionality' stamp: 'dsp 10/3/2001 15:01'!
addSaveHtml
self addAction: [:text :request :response :shelf :book :page | '', (TextFormatter crlfToCr: text), '']from: '' to: ''.
self addAction: [:text :request :response :shelf :book :page | '', (TextFormatter crlfToCr: text), '']from: '' to: ''.
self addAction: [:text :request :response :shelf :book :page | '', (TextFormatter crlfToCr: text), '']from: '' to: ''.
! !
!PageFormatter methodsFor: 'functionality' stamp: 'dsp 10/3/2001 15:04'!
addUpdateHtml
self addAction: [:text :request :response :shelf :book :page | '', text, ''] from: '' to: ''.
self addAction: [:text :request :response :shelf :book :page | '', text, ''] from: '' to: ''.
self addAction: [:text :request :response :shelf :book :page | '', text, ''] from: '' to: ''! !