GSoC/2019/StatusReports/SonGeon

From KDE Community Wiki

Title of your project

kmarkdown-qtview with WYSIWYG markdown editor

Details about your project

kmarkdown-qtview project detail First, most markdown editors are using webview based renderer. But webview based editors have the lack of printing options. Because Markdown is aiming to make a good looking document with simple text notations on the web environment. In a single webpage, It doesn’t have pagination for printing.

So webview based renders have the same problems. For example, document elements are printed across multiple pages and the document’s paragraphs, word spacing, and line spacing are slightly different compared to the screen. If the markdown editor support the preview of the paging, better text rendering with the layout of printing, It will be more powerfull like word processors.

Second, the KDE project already has the markdown renderer kmarkdownWebview. Currently, It has a forked third-party javascript library for markdown rendering. I want to minimize the dependencies. And It use the Qt’s QWebEngine and QWebChannel. Those are used to run a JS library and It brings a lot of overhead.

I think writing new renderer using Qt API and C++ without a third-party library is a lighter approach. So I choose to make parser with the Boost Spirit. It’s the PEG parser generator implemented in the boost library and It’s super fast.

Work report

2019-06-29 Make Header view

2019-06-25 start make a qt view

2019-06-20 Make Idea about new structure

2019-06-10 add licensing header on source code

2019-06-05 add EmphasizedString for parsing text with emphasize tokens

2019-06-05 basic project structure

Links to Blogs and other writing

My Blog link : jen6.github.io


1. First GSOC Project Introduction

On this summer I’m working with the KDE community by participating the “Google Summer of Code” Program. My main goal during GSOC period is making a markdown view, WYSIWIG editor using C++ and Qt. There were two reasons that I started to make a new markdown view. First, most markdown editors are using webview based renderer. But webview based editors have the lack of printing options. Because Markdown is aiming to make a good looking document with simple text notations on the web environment. In a single webpage, It doesn’t have pagination for printing. ...

2. First week of GSOC, Piece Table Implement

first, I started to make the markdown parser using the Boost Spirit X3. Spirit makes easy to express grammar using the PEG. But it’s templet based library so it was hard to find out which part is wrong. Also documentation of spirit was limited. So I had a lots of trial and error to get compilable source code....