[KDEREVIEW] Rich text markup builders

Matt Rogers mattr at kde.org
Thu Nov 6 02:36:20 GMT 2008


On Wednesday 05 November 2008 13:16:20 Stephen Kelly wrote:
> Hi,
>
> Some kdepim applications and libraries require cleaner html from a
> qtextdocument than provided by its toHtml method. The qt html contains a
> sea of span tags and styles. This causes hassle when adding a rich text
> signature to a message in kmail for example.
>
> I wrote some classes to build cleaner html and also allow writing a builder
> class for other forms of output such as BBCode, MediaWiki markup and a 
form
> of plain text markup common in emails.
>
> There are unit tests for html output, and I'm creating some for the plain
> markup output too.
>
>
> The code is here:
>
> http://websvn.kde.org/trunk/kdereview/richtextbuilders
>
> More history here:
>
> http://thread.gmane.org/gmane.comp.kde.devel.pim/22651
> (The email specific classes have been discarded.)
>
> apidox:
> http://api.kde.org/playground-api/pim-apidocs/richtextbuilders/html/annotat
>ed.html
>
> Here's a rundown:
>
> KMarkupDirector - 'reads' a QTextDocument and instructs an abstract 
builder
> object to create its markup. Move into kdelibs/kdeui.
>
> KAbstractMarkupBuilder - defines interface of a builder. Move into
> kdelibs/kdeui
>
> KHTMLBuilder - Builds HTML output. Move into kdelibs/kdeui
> KPlainTextMarkupBuilder - Builds plain text markup. Move into kdelibs/kdeui
> BBCodeBuilder, MediaWikiBuilder - Move into
> kdelibs/kdeui/tests/krichtexteditor as examples only for now.
> KRichTextEditor - Merge back into kdelibs/kdeui/test/krichtexteditor
> /tests/htmlbuildertests - Move into kdelibs/kdeui/tests

Where are the two users of these classes?
-- 
Matt




More information about the kde-core-devel mailing list