KDTDEdit or a simple xml/html wysiwyg editor
Adam Treat
manyoso at yahoo.com
Mon Oct 7 17:37:40 BST 2002
Hello,
After seeing all of the traffic regarding
KTextEdit/KRichTextEdit/Kafka/Quanta/KMail I thought I'd put in my wish list
;) I'm looking for a widget that would extend QTextEdit, but allow 'setFormat
(customDTD)' instead of regular RichText or AutoText. Of course the widget
would need some ability to insert the tags that the DTD specifies and would
need to override the 'text ()' method to output the specified xml of the dtd.
I believe this is what the Quanta folks are looking for as this would allow
for a basic wysiwyg html editor. It would need to be extended to support
complex html I'd imagine.
After looking for support for something like this in Qt I found the
'QTextCustomItem * tag ( const QString & name ... )' method in QStyleSheet.
From the little bit of documentation this looks like something useful,
however after looking at the source and noticing the 'do not use in
applications' blurb I've discovered that this isn't really useful as it
stands.
I've prototyped just such a widget in Qt#, but it is a pretty big kludge right
now. The one big missing feature of this widget is the ability to set
presentation attributes for custom tags. It can do simple things such as
'setBold (true)' whenever it encounters my custom '<bold>' tag, but that is
about it. For more complex html the presentation attributes would become
pretty complex and most definately need some support from the KHTML part.
So, does anyone know what's up with the 'tag ()' method in QStyleSheet? Any
ideas on other approaches or suggestions?
Cheers,
Adam
More information about the kde-core-devel
mailing list