Skip to content

Using the HTMLCanvas

philippeback edited this page May 21, 2013 · 1 revision

Here is a sample renderOn: html method for a Widget subclass:

"Some Stuff adapted from Seaside book"
html p: 'A plain text paragraph.'.
html p: [
	
    html p: 'A paragraph with plain text followed by a line break.'.
    html br.
    html em with: 'Emphasized text '.
    html p: 'followed by a horizontal rule.'.
    html hr.
    html p: 'An image: '.
    html img src: 'http://www.seaside.st/styles/logo-plain.png' ].
	
html p: [
    10 timesRepeat: [
        html img
            src: 'http://www.seaside.st/styles/logo-plain.png';
            width: 50 ] ].
			
html entity: 'copy'.

html with: 'HELLO WITH'.

html em appendString: 'A STRING APPENDED'.
Clone this wiki locally