ITADN

Can you show an example of opening a markdown file and saving as an html file

#2ClosedLight-Wizzard 创建于 2023-02-20
L
Light-Wizzardcommented
Looking at your example it seems I need to cast to get the information in the iterator (it) you use, would I also need to make a case for each type? There must be a better way, but I did not figure it out. I want to use this in a Qt Desktop C++ Widget App, in an editor, so I want to pass in the text and not the file name and return the text, I started off by using the Qt example for the Markdown editor, but it is way too slow, it uses JavaScript. Most code I have seen only deals with files, which means I have to save the file, every time I enter a character so that I can update the HTML previewer, which is a Web Engine Widget, so I will have to write a wrapper around them to deal with this issue because this makes the editor GUI slow, plus the hourglass for saves, so I need figure out a better solution, and why I am looking at your code instead of C, only thing is your example does not help me much. The App I am working on is at https://github.com/Light-Wizzard/QtWidgetCpackInstaller, the app is just an Editor, and the focus is on deploying this application using cmake, cpack, and NSIS, in this case, I want to use your parser to keep this a Qt example application for deploying Web Engine enabled apps. The [Qt Web Engine Widget Markdown editor](https://doc.qt.io/qt-6/qtwebengine-webenginewidgets-markdowneditor-example.html) uses a JavaScript implementation that is too slow, I would have to figure out how to replace that parser with yours, to know how much faster it is, my guess is that it will be fast enough. Thanks for any help.
关闭于 2023-02-22 13 条评论