[GOODIE]Text to HTML on Clipboard
scharles at nildram.co.uk
Wed Apr 10 15:35:19 UTC 2002
First, apologies to Bob Arning, I sent a reply to you when it should have
gone here. OOPS! Thanks to Bob I have managed to complete what I hope to be
a useful goodie. Here's an excerpt from the wrongly sent message:
"Anyway, thanks for the fix, I now have pleasure in releasing the thing
the list, I'll also stuff it on the website I laughingly call my own at
http://www.obvious.nildram.co.uk/stinformation.html. I've attached the
changeset to this message as well.
It works on 3.2gamma-4811, and for a laugh I also tried it on a 2.8 VM
Jan 2000, cs:2359, and with one small change it worked there too so I am
assuming it'll work anywhere! The change was adding 'asText' after
as the 2.8 clipboard seemed to expect a Text object."
Basically, it allows a yellow button 'copy as HTML' from ANY TextMorph
containing styled text and it places an HTML equivalent in the clipboard so
that you can then paste it into something like 1st Page, FrontPage,
whatever, and what you see is a full colour, styled equivalent of what was
in the code pane.
I am using it myself for two reasons:
1. to help write some web tutorials on Morphic and Squeak in general
2. I can write these tutorials inside a Squeak workspace and when I am
I just copy as HTML programmatically and write an HTML file straight
the web image, i.e. Squeak as a web page editor and why not!
I might try to extend it to handle embedded morphs by creating an image of
the morph (>>export as GIF) and then create the relevant <IMG...> tag. But
not yet! The downside to Squeak is that there is just so much stuff that you
get sidetracked to the Nth degree, so much in fact that you end up never
finishing the top level thing, whatever that was!!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5711 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020410/4f0c5812/TexttoHTML.1.obj
More information about the Squeak-dev