Calling down the NSText gods!
Calling down the NSText gods!
- Subject: Calling down the NSText gods!
- From: Scott Anguish <email@hidden>
- Date: Tue, 15 Oct 2002 03:03:32 -0400
I'd like to revamp a simple HTMLEditor (wysiwyg) that I've been playing
with. Well, its more for writing structured text that HTML...
looking at it in the basic HTML style terms, I need to have containers
for
headers (h1, h2, h3, h4)
paragraphs
ul lists
li's within ul's
and line breaks.
within those containers there will be text with various paragraph
formatting (center, right, left), and individual ranges of font
changes/colors, etc.. those are easy to walk though an attributed
string and get.
But the actual structure is more difficult.
I'd been considering perhaps breaking each of the sections (structures)
up into individual NSTextContainers, and then pushing or pulling the
containers further down the document up or down as the currently edited
one is expanded or contracted.
if I trapped the different selector for insertParagraph and
insertLineBreak in the text delegate it would be fairly simple to break
the paragraphs and lines up into individual components I think...
(think being the operative word there.. I've not tried this yet)
Any comments on this?
I probably could just walk paragraph by paragraph through a normal
NSTextView's storage and get what I need... i wish that the Apple
script 'get third paragraph' type stuff worked easily on this... :-)
_______________________________________________
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.