While trying to use your classes i felt the following addition to QwwRichTextEdit would rock it more!
- Toolbuttons to control the subscript and superscript of text.
- An intelligent toHtml() method which isn't bloated as is that of QTextEdit
While trying to use your classes i felt the following addition to QwwRichTextEdit would rock it more!
- Toolbuttons to control the subscript and superscript of text.
- An intelligent toHtml() method which isn't bloated as is that of QTextEdit
The biggest difference between time and space is that you can't reuse time.
-- Merrick Furst
They will be available in the upcoming release.
That's more complicated. The problem is within QTextDocument and not QTextEdit so it should be solved there - a class exporting QTextDocument to proper html would be needed as a general purpose solution. It's not that hard to implement - you can traverse nodes of the document easily and create output of your choice.An intelligent toHtml() method which isn't bloated as is that of QTextEdit
If i remember correctly, i read on planet kde that someone has written a script to reduce the richtext's html generated by designer. Googling didn't help me.
Anyway's i will try to write one if i can't find the script.
The biggest difference between time and space is that you can't reuse time.
-- Merrick Furst
In my opinion this is not the way to go. You double the work this way - first QTextDocument generates its html representation and then the script simplifies it into another html. It's better to generate a clean html in the first place and its easily achievable - all that it takes is a bit of brainstorming how to avoid pitfalls that may arise and then apply those developed rules during document traversal.
I'm thinking of developing an output generator for the MediaWiki syntax. Currently I don't have time to do it, but maybe in the near future I will.
Someone is working on a MediaWiki "rich text editor" control for Qt., again, look in the KDE planet.
About editing HTML: has anyone tried use the webkit editor control...? I know it can display HTML (it's pretty good at it), but how about editing, anyone tested?
The biggest difference between time and space is that you can't reuse time.
-- Merrick Furst
Attached is a simple extension to QwwRichTextEdit that adds a "link" button, allowing user to add hyperlinks. Also two new signals are emited: anchorHovered(QString) and anchorClicked(QString).
(Wysota, feel free to use this code or modify it as you like.)
Thanks. I'll include it in the next release of the widget set. It should be out today or tomorrow.
Bookmarks