|
|
Home » Developing U++ » U++ Developers corner » [Proposal] Markdown to QTF converter/parser
|
|
Re: [Proposal] Markdown to QTF converter/parser [message #55891 is a reply to message #55829] |
Sun, 27 December 2020 20:34 |
Oblivion
Messages: 1094 Registered: August 2007
|
Senior Contributor |
|
|
Hello Mirek,
Please find attached the "technical preview version" of Markdown package. (Let's call it that until we fix the remaining issues (before 2021.1 release))
Package contains:
- Markdown package
- Markdown Editor Example
Markdown package contains the latest version of md4c library.
It lacks documentation, for the time being. I will add it in the following days. However, it is so simple to use, documentation is hardly required.
Current issues and todo:
## TODO:
- Image handling is yet to be implemented.
- Task lists are yet to be implemented.
## Remaining issues:
- Block elements don't have configurable style.
- Page properties (margins, indentation, etc.) are not configurable.
- Soft break is not handled very well
The Markdown editor example is a so-called "real-time" editor in which you can design/test/load/save/export markdown documents in real-time. (it reacts to key-strokes)
It is what I use to test markdown package.
If you can grant me SVN write permissions to package location after adopting the package, I'll fix the remaining issues and maintain the package.
Best regards and a happy, productive new year!
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
|
|
|
|
|
Re: [Proposal] Markdown to QTF converter/parser [message #56851 is a reply to message #53137] |
Wed, 21 April 2021 10:13 |
Oblivion
Messages: 1094 Registered: August 2007
|
Senior Contributor |
|
|
Hi,
I have added image span handling to plugin/md. It should be available with U++ nightly builds.
Summary:
U++ md plugin does not render images or recognize any image format. It is up to client code to render and manipulate images. This is done via an event:
Event <VectorMap<String, String>& > WhenImages;
The md plugin will parse/collect the image data of a given md document and hand them to the client code as a string map via the WhenImages event.
The keys of this map are image URLs whereas the values are meant to be filled with some QTF/Richobject data (as qtf).
In this way, the client code can [down]load and manipulate the image data as it sees fit (e.g. it can simply substitute a qtf text on image loading/retrieval failures, or blacklist images from certain domains, or put decorative frames around images, using tables etc...)
This method also allows MT or async calls for image [down]loading and rendering, as it passes to client a complete list of available image span info at once.
Now, the map values can certainly be filled with the "whole" image strings, but this is usually not desireable, as it makes the document larger after a couple of images.
Instead you can use an array of RichObjects to keep the real image data in a cache and only pass the serial/pointer as the map value, using the QtfRichObject() function, for example.
If you have any questions, suggestions etc., let me know.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Wed, 21 April 2021 10:50] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 15 04:45:52 CEST 2024
Total time taken to generate the page: 0.02093 seconds
|
|
|