Save and restore emphasized text

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Save and restore emphasized text

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
Reply | Threaded
Open this post in threaded view
|

Re: Save and restore emphasized text

Michael Lucas-Smith-2
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:
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



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Save and restore emphasized text

Rick Hedin
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.

Michael

On 7 May 2011 11:38, Rick Hedin <[hidden email]> wrote:
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





--
I insist on rapport!

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Save and restore emphasized text

Terry Raymond
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

===========================================================
Terry Raymond
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

From: [hidden email] [mailto:[hidden email]] On Behalf Of Rick Hedin
Sent: Saturday, May 07, 2011 2:38 PM
To: vwnc NC
Subject: [vwnc] Save and restore emphasized text

 

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