Hi I think it's quite a decent rich-text component already, and it would be a pity to dump such a nice feature set. It's also reasonably clean internally, so I don't see a big problem with fixing up remaining issues.
I'll have a look at copy and paste and see what needs to be done. I seem to remember that the AWT API is fairly awkward to work with, but the simple case (plain ascii text) should not be hard to get working. If you're talking about the complex case (maintaining styles and formatting), then yes, it's sufficiently hard that even Thunderbird doesn't manage to get it right very often. Getting that right for the 90% case would require almost as much effort as re-writing the TextArea component, so I'm not particularly motivated to try it. It would require serialising and de-serialising to RTF format, since that's the lowest-common-denominator format for rich-text applications under Windows. Under linux, it would simply never work well, since there is no equivalent LCD format. Undo/redo is not such a big deal in my opinion. Certainly I have never even seen anyone notice it's absence on the Pivot mailing list :-) But it's probably easier to get going than rich-copy-and-paste. -- Noel Grandin Greg Brown wrote: > By the way, I finally had a chance to look at the TextArea improvements - > very cool! Once the new (plain) TextArea component is done, we can refactor > that one to RichTextArea. > > I had one thought - feel free to take it or leave it: What if we were to > rename the current (rich) TextArea to TextPane and make it read-only? In > other words, define it as a container that lays out its children based on > text flow vs. some other kind of layout mechanism. I suggest this because > there are still some issues with editing in the current TextArea - notably, > copy/paste is kinda broken, and the fix will probably be difficult. Also, > undo/redo is still not implemented, nor is the RichTextToolbar component we'd > need to allow the user to author rich text. > > We have gotten more requests on the list for text-based layout than we have > for rich text authoring, so I think it is something worth considering. Let me > know what you think. > > G > >