SystemOrganization addCategory: #'TextLint-Seaside'! !TLWhitespace methodsFor: '*textlint-seaside' stamp: 'lr 10/25/2010 19:50'! render: aCollection on: html html span class: 'whitespace'; with: self text! ! !TLWord methodsFor: '*textlint-seaside' stamp: 'lr 10/25/2010 19:51'! render: aCollection on: html html span class: 'word'; with: self text! ! !TLMarkup methodsFor: '*textlint-seaside' stamp: 'lr 10/25/2010 19:50'! render: aCollection on: html html span class: 'markup'; with: self text! ! !TLElement methodsFor: '*textlint-seaside' stamp: 'lr 10/25/2010 19:46'! render: results on: html self children do: [ :each | each render: results on: html ]! ! WAComponent subclass: #TLRootComponent instanceVariableNames: 'checker results' classVariableNames: '' poolDictionaries: '' category: 'TextLint-Seaside'! !TLRootComponent class methodsFor: 'initialization' stamp: 'lr 10/25/2010 19:10'! initialize WAAdmin register: self asApplicationAt: 'textlint'! ! !TLRootComponent methodsFor: 'actions' stamp: 'lr 10/25/2010 19:42'! analyze: aString checker := TLTextLintChecker new. checker addStyle: TLWritingStyle scientificPaperStyle. results := checker check: aString! ! !TLRootComponent methodsFor: 'rendering' stamp: 'lr 10/25/2010 19:32'! renderBodyOn: html checker isNil ifTrue: [ self renderTextOn: html ] ifFalse: [ self renderResultOn: html ]! ! !TLRootComponent methodsFor: 'rendering' stamp: 'lr 10/25/2010 19:25'! renderContentOn: html html div class: 'head'; with: [ self renderHeadOn: html ]. html div class: 'body'; with: [ self renderBodyOn: html ]. html div class: 'foot'; with: [ self renderFootOn: html ]! ! !TLRootComponent methodsFor: 'rendering' stamp: 'lr 10/25/2010 19:25'! renderFootOn: html html paragraph: [ html anchor url: 'http://scg.unibe.ch/staff/fabrizioperin/'; with: 'Fabrizio Perin'. html text: ', '. html anchor url: 'http://www.lukas-renggli.ch/'; with: 'Lukas Renggli'. html text: ', and '. html anchor url: 'http://www.jorgeressia.com/'; with: 'Jorge Ressia'. html text: '.' ]! ! !TLRootComponent methodsFor: 'rendering' stamp: 'lr 10/25/2010 19:25'! renderHeadOn: html html heading level: 1; with: self title. html paragraph: 'TextLint is a tool to check your texts for common style errors. Just paste your text, HTML or LaTeX source into the text field below to give it a try.'! ! !TLRootComponent methodsFor: 'rendering' stamp: 'lr 10/25/2010 20:04'! renderResultOn: html html paragraph class: 'result'; with: [ checker document render: results on: html ]! ! !TLRootComponent methodsFor: 'rendering' stamp: 'lr 10/25/2010 19:34'! renderTextOn: html html form: [ html textArea callback: [ :value | self analyze: value ]. html submitButton: 'Analyze' ]! ! !TLRootComponent methodsFor: 'accessing' stamp: 'lr 10/25/2010 20:14'! style ^ ' textarea, p.result { width: 100%; height: 400px; line-height: 1.5; font: 1em "andale mono", "lucida console", monospace; } p.result { overflow: auto; white-space: pre-wrap; white-space: -moz-pre-wrap !!important; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; } p.result .markup { color: gray; }'! ! !TLRootComponent methodsFor: 'accessing' stamp: 'lr 10/25/2010 19:23'! title ^ 'TextLint'! ! !TLRootComponent methodsFor: 'updating' stamp: 'lr 10/25/2010 20:00'! updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot title: self title. aHtmlRoot stylesheet url: 'http://textlint.lukas-renggli.ch/blueprint/screen.css'! ! !TLPunctuationMark methodsFor: '*textlint-seaside' stamp: 'lr 10/25/2010 19:50'! render: aCollection on: html html span class: 'punctuation'; with: self text! ! TLRootComponent initialize!