Is there some way I can emphasize text in an editor, maybe a WorkspacePage, write it out to a file as html, process that html file in some way (I will take care of this part), and read the html file back in, having the html display as bold or italics or whatever in the text editor? So:
1. Put in an editor: some bold text
2. Write it out to a file: myfile.htm some <b>bold</b> text
3. Process the file by some unknown process: some <b><i>bold and italicized</b></i> text
4. Read the file back in and see the attributes: some bold and italicized text
Heeg's ComposedTextEditor saves emphasized text as html, but when you read it back in, it's not interpreted.
Thanks for any help.
Rick
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Does it have to be editable from outside of VisualWorks? If not, Text is just an object, you can probably BOSS it to disk.
Michael
On 7 May 2011 11:38, Rick Hedin <[hidden email]> wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi, Michael.
Yeah, the main point is the processing. It'll also be a VisualWorks process, but a different one.
Suppose you have a program that will bold all the words that have a Latin cognate, and further italicize all the words for whom the Latin cognate is feminine.
Maybe I should ship the VisualWorks object over to another object for processing, and then insert it back into the original WorkspacePage object. Is there a convenient way to suck out the object (maybe a ComposedText object) and insert a new ComposedText object into a WorkspacePage?
Regards,
Rick
On Sat, May 7, 2011 at 2:04 PM, Michael Lucas-Smith <[hidden email]> wrote: Does it have to be editable from outside of VisualWorks? If not, Text is just an object, you can probably BOSS it to disk. -- I insist on rapport! _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Rick Hedin
Rick Save it as a store string, i.e. “text storeOn: aStream”. You can then later read the result using “Object readFrom: aStream”. The result should be the restored Text. Terry From: [hidden email] [mailto:[hidden email]] On Behalf Of Rick Hedin Is there some way I can emphasize text in an editor, maybe a WorkspacePage, write it out to a file as html, process that html file in some way (I will take care of this part), and read the html file back in, having the html display as bold or italics or whatever in the text editor? So: 1. Put in an editor: some bold text 2. Write it out to a file: myfile.htm some <b>bold</b> text 3. Process the file by some unknown process: some <b><i>bold and italicized</b></i> text 4. Read the file back in and see the attributes: some bold and italicized text Heeg's ComposedTextEditor saves emphasized text as html, but when you read it back in, it's not interpreted. Thanks for any help. Rick _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |