KTextEditorPreviewPlugin 0.2.1 (last stand-alone)

KTextEditorPreviewPlugin 0.2.1 has been released.

Example: KTextEditor Document Preview plugin used with Kompare KParts plugin in Kate

The KTextEditorPreviewPlugin software provides the KTextEditor Document Preview Plugin, a plugin for the editor Kate, the IDE KDevelop, or other software using the KTextEditor framework.

The plugin enables a live preview of the currently edited text document in the final format, in the sidebar (Kate) or as tool view (KDevelop). So when editing e.g. a Markdown text or an SVG image, the result is instantly visible next to the source text. For the display the plugin uses that KParts plugin which is currently selected as the preferred one for the MIME type of the document. If there is no KParts plugin for that type, no preview is possible.

Download from:

f5fd393f15fb04a49b22b16b136b1f614f4d5502a9a9a0444d83a74eff3a1e19 ktexteditorpreviewplugin-0.2.1.tar.xz

Signed with my new PGP key
E191 FD5B E6F4 6870 F09E 82B2 024E 7FB4 3D01 5474
Friedrich W. H. Kossebau

Change since 0.2.0

  • Translations improved and added for new languages (es, pl, ru)


This is the last stand-alone release of this plugin. It has been merged post-release as planned into the Kate repository, so will see its future releases as part of Kate, with the first being the ones as part of KDE Applications 17.12.

Developers: Improve your favourite KParts plugin

While a usual KParts plugin works out of the box, for a perfect experience with the Automatic Updating option some further improvements might be needed:

A few KParts plugins have already seen such adaptions, like the SVGPart and the KUIViewerPart (see also blog post), adaptions to be released with KDE Applications 17.12.
Another KParts plugin has been written with that in mind from the start, the KMarkdownWebViewPart (see also blog post), which already has been released.

You might want to take some guidance by the respective commit “Support loading by stream and restoring state on reload” to the SVGPart repository.


2 thoughts on “KTextEditorPreviewPlugin 0.2.1 (last stand-alone)

    • Currently the Preview plugin simply relies on the settings provided by KMimeTypeTrader::preferredService(…), which can be (only) configured by the (Plasma) System Settings.

      So there in the File Associations for the MIME type “text/x-patch”, in the Embedding page, you need to have the KomparePart as the top one in the “Services Preference Order”.

      Possibly the Preview plugin should get its own configuration dialog, both for discoverability but also for custom selection of which KParts plugin to use. No immediate plans myself though to implement that. Contributions welcome.

      Be aware that the KomparePart is a candidate for getting some improvements for this (new) use-case. It “works” for a start, but updating the content resets the view state, also is navigating to a certain file not straightforward.
      Feel inspired to improve it, I just showed it in the screenshot as potential use-case, as somebody had already mentioned they successfully used it to twist a patch 🙂
      (in master branch of Kompare I already did some minor tweaks, like adding a context menu for some slightly quicker access to navigating through the files in the diff)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.