[Qt-creator] QtCreator Markdown Plugin
Eike.Ziller at qt.io
Wed Apr 14 09:52:06 CEST 2021
> On Apr 12, 2021, at 17:51, ahmet erdinc yilmaz <ahmeterdincyilmaz at gmail.com> wrote:
> I'm very glad to hear that you liked the plugin, thank you!
> As discussed in https://forum.qt.io/topic/124822/qtcreator-markdown-plugin, I really want that it is included QtCreator by default, but I don't know whether it is possible or not for the following reasons:
> - Plugin depends on qtwebengine and qtwebchannel modules which do not ship with the QtCreator by default.
> And another advantage that comes with webengie, since the parsing is in the engine process you don't need to code for extra parsing thread and synchronization of data. Less code, less headache I think.
> As litehtml html rendering option there are following problems (IMHO):
That is definitely correct :)
> - It is not fully compatible with HTML/CSS standards.
I’d say that doesn’t matter much, since the preview in Qt Creator will probably use pretty simple HTML/CSS which works perfectly fine.
> - If I understand correctly, for drawing texts, images, fonts we need other libraries.
We use litehtml for Qt Creator’s help browser by default now. I wrote a frontend that uses litehtml to draw HTML to a QPainter, plus a simple widget that is used in the help browser, enhanced with text search, selection, and copy.
This is a library that can be used by Qt Creator plugins (when built with CMake) by adding QtCreator::qlitehtml to library dependencies.
Unfortunately not yet documented, but here’s
the library: https://code.qt.io/cgit/playground/qlitehtml.git/
how it is used in Qt Creator’s help plugin: https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/plugins/help/litehtmlhelpviewer.cpp
> In my professional coding time (to earn money :-( ), I use IDEs Intellij and vscode mainly since I am a JVM (java, kotlin, xtext...) developer (by the way, my favorite is C++, Qt and QtCreator. Really!). All these IDEs have these features, developers like them. I felt uncomfortable when I used my plugin without any feature that I mentioned. For example, without scroll synchronization after your md file gets bigger, you start to get angry.
Scroll synchronization is a big plus, indeed.
> I like Qt and Qt Community, I will be so happy if I can help them. I really want to upstream plugin but I know that it is not an easy decision when it comes to dependencies. As I explained, I really tried not to add them but I can not find any other useful and maintainable option. It is your decision and which decision is made, I want to help QtCreator become more beautiful! Yes, she is very beautiful :-).
> If your decision is not to upstream, then I want your ideas about automatic downloading dependencies. Then it will be more useful.
> Best regards,
> On Mon, Apr 12, 2021 at 3:36 PM Cristian Adam <cristian.adam at qt.io> wrote:
> A simple websearch after markdown and c++ pointed me to: https://stackoverflow.com/questions/889434/markdown-implementations-for-c-c
> I would love to have such a plugin in Qt Creator, since now https://github.com/cloose/CuteMarkEd to edit markdown files outside Qt Creator.
> I think litehtml should suffice to display the html rendered by a markdown parser.
> On 19/03/2021 09:17, ahmet erdinc yilmaz wrote:
>> Hi all,
>> I have been developing a markdown plugin for QtCreator. I think it is time to announce :-). You can reach from https://github.com/erdinc09/MarkdownEditView.
>> I also published releases for all three platforms. I hope you like it.
>> • Syntax highlighting in editor
>> • Html preview
>> • Code highlighting in preview
>> • Theme aware preview and editor
>> • Bidirectional vertical scroll synchronization between editor and preview
>> Dark Theme:
>> Classic Theme:
>> I have already announced it on the forum.qt.io.
>> Best regards,
>> // Erdinç
>> Qt-creator mailing list
>> Qt-creator at qt-project.org
> Qt-creator mailing list
> Qt-creator at qt-project.org
Principal Software Engineer
The Qt Company GmbH
eike.ziller at qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator