Bug 360811 - markdown preview
Summary: markdown preview
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-21 13:28 UTC by Martin Steigerwald
Modified: 2018-03-29 13:19 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Steigerwald 2016-03-21 13:28:46 UTC
I´d like a markdown preview in a separate view either side by side with the text input or below it maybe. Ideally using Kate´s split view system as a base.

Version not in version list: 15.12.1

Reproducible: Always




Could be a plugin of course.
Comment 1 Gregor Mi 2016-03-22 17:33:24 UTC
An intermediate step to the "live preview" feature could be plugin that displays the document structure (e.g. headings, subheadings, images) in a tree. I myself would find that useful not only for markdown but also for asciidoc.
Comment 2 Martin Steigerwald 2016-03-22 18:40:56 UTC
Gregor, thanks for your input. That is a different, but related feature. I´d like to see this as well. Please open a new bug about this and post a link here. Thanks. (One issue / feature in one bug.)
Comment 3 Kevin Funk 2017-03-29 09:29:48 UTC
Similar request for KDevelop: 
  https://bugs.kde.org/show_bug.cgi?id=378223

Having the Markdown preview in a plugin would be appreciated, to be able to use this plugin in both kate & kdevelop!
Comment 4 Gregor Mi 2017-03-29 10:16:50 UTC
I happend to stumble upon those tools here yesterday:

- grip (https://github.com/joeyespo/grip) - live preview in web browser with autorefresh

- markdown-toc (https://github.com/jonschlinkert/markdown-toc) - generate TOC

They are pretty easy to use. There is a mini tutorial (in German) of how to install and use them including a screenshot: https://github.com/feinstaub/tp64/tree/master/tutorials/markdown-primer

Maybe something can be implemented for kate/kdevelop to easily download, install and use those tools.
Comment 5 Gregor Mi 2017-03-29 14:38:59 UTC
Addition to "grip": I just realized that grip uses the GitHub web API (60 requests/hour for anonymous users, registered users have 5,000 requests/hour; offline renderer is not ready yet). Too bad.
Comment 6 Friedrich W. H. Kossebau 2017-08-16 00:24:21 UTC
Hi. I am also part of the club of people who would like to have some live preview in the final format when editing some text-based sources. And to get the itch scratched, last WE I started work on a KTextEditor plugin for a generic preview toolview, which would delegate actual preview to further plugins, one per format/mimetype.
(Personally want to use it in KDevelop, but why not making Kate users in the club happy as well, even if basing it on KTextEditor plugin API means limiting preview to KTextEditor documents, but then this is the most common base format edited and also all my current needs are covered)

I reached some first working prototype today and pushed it to https://commits.kde.org/scratch/kossebau/ktexteditorpreviewplugin
to have some starting point to play with and discuss how this should be done.

Right now has preview plugins for
* Markdown (based on https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-markdowneditor-example.html)
* SVG (plain QSvgWidget usage)
* Dot graph (needs current kgraphviewer master with D7329 added)

No idea what would be a good forum to collect all our use cases and feature requests to turn this into something really useful.

Will write an email to kwrite-devel the next days to kick off further discussions. Just dropping some first info here, so people watching this bug are aware of this prototype :)
Comment 7 Martin Steigerwald 2017-08-16 07:12:01 UTC
(In reply to Friedrich W. H. Kossebau from comment #6)
> the itch scratched, last WE I started work on a KTextEditor plugin for a
> generic preview toolview, which would delegate actual preview to further
> plugins, one per format/mimetype.

Thank you Friedrich. I just subscribed to kwrite-devel. Depending on amount of additional dependencies required I may build it locally.
Comment 8 Friedrich W. H. Kossebau 2017-08-21 22:39:12 UTC
Update on preview plugin work:

Email to kwrite-devel is sent, see https://marc.info/?l=kwrite-devel&m=150333078206625&w=2

See also related blog post https://frinring.wordpress.com/2017/08/21/look-what-you-have-donewwdo/
Comment 9 Erik Quaeghebeur 2018-03-29 12:10:58 UTC
My impression is that this is resolved with 17.12 and markdown support in Okular (via discount). At least it is for me. Please report back on your experiences so that we may perhaps close this bug.
Comment 10 Martin Steigerwald 2018-03-29 13:19:03 UTC
Hi Erik. There is not yet a Kate 17.12 package for Debian Sid yet. But from what I read in Friedrich´s blog posts this is what my feature request is about, thus closing as fixed.