Advanced text-layout questions
Advanced text-layout questions
- Subject: Advanced text-layout questions
- From: Prachi Gauriar <email@hidden>
- Date: Sun, 4 Jan 2004 14:33:16 -0600
Hi everyone. For a design project, I'm working on creating an
application that will need a pretty sophisticated text system... it'll
basically end up being a limited standards-based WYSIWYG HTML editor.
I've been brainstorming for a few days on how to approach the text
system, and I'm really perplexed as to how I can achieve some things.
After reading the text architecture documentation, I'm kind of at a
loss about how to approach some problems. The big problem right now
is:
For a code snippet like
<body>
BODY BODY BODY
<div style="border:1px solid black;">DIV DIV DIV</div>
MORE BODY MORE BODY MORE BODY
</body>
I'll have a display like:
______________________________________________________________
| BODY BODY BODY |
| ___________________________________________________________ |
| | DIV DIV DIV ||
| ----------------------------------------------------------- |
| MORE BODY MORE BODY MORE BODY |
|______________________________________________________________|
In order to create this, I was thinking of creating a document with an
NSTextView (or some modified version of it). Then, for the DIV, I was
hoping to treat it like a single character by making it an
NSTextAttachment (with a custom subclass of NSTextAttachmentCell) and
inserting a new text view inside of that attachment.
Unfortunately, this doesn't seem to make complete sense to me. Is
there a way to embed an NSTextView (or some modified version of it)
inside of another NSTextView, while still treating it like a single
character? Can an NSAttachmentCell contain an NSTextView?
Any help would be greatly appreciated.
-Prachi
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.