Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » [Proposal] Markdown to QTF converter/parser
Re: [Proposal] Markdown to QTF converter/parser [message #55884 is a reply to message #55864] Sat, 26 December 2020 01:22 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 698
Registered: December 2005
Location: Budapest, Hungary
Contributor
OK, I palan registering to github to be able to send you pull requests. Or is it enough for you if I save my commits to files and send them to you in PM here?
The changes are made to be able to use it with Google in a desktop app, signing in to send emails.
Re: [Proposal] Markdown to QTF converter/parser [message #55885 is a reply to message #55884] Sat, 26 December 2020 09:32 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Hello Zsolt,

Quote:
OK, I palan registering to github to be able to send you pull requests. Or is it enough for you if I save my commits to files and send them to you in PM here?
The changes are made to be able to use it with Google in a desktop app, signing in to send emails.


You don't need to sign in to GitHub for that, you can simply upload the modified package via a message to Bazaar OAuth topic: https://www.ultimatepp.org/forums/index.php?t=msg&th=104 12&start=0&
(Let's continue there Smile )

Best regards,
Oblivion



Re: [Proposal] Markdown to QTF converter/parser [message #55891 is a reply to message #55829] Sun, 27 December 2020 20:34 Go to previous messageGo to next message
Oblivion is currently offline  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





Re: [Proposal] Markdown to QTF converter/parser [message #55912 is a reply to message #53137] Fri, 01 January 2021 14:39 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
A screenshot demonstrating the image handling progress update (This is not avaiable yet):



index.php?t=getfile&id=6323&private=0



Best regards,
Oblivion


[Updated on: Fri, 01 January 2021 14:43]

Report message to a moderator

Re: [Proposal] Markdown to QTF converter/parser [message #55927 is a reply to message #53137] Mon, 04 January 2021 09:49 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 221
Registered: June 2011
Experienced Member
Very nice. I did a simple markdown to RichCtrl a year or so ago using PEGTL, so it would be nice to see something more complete.
https://github.com/BornTactical/MarkdownFormatter

[Updated on: Mon, 04 January 2021 09:54]

Report message to a moderator

Re: [Proposal] Markdown to QTF converter/parser [message #56183 is a reply to message #53137] Thu, 04 February 2021 17:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
It is now used in UppHub to display README.md. Unfortunately, to do that, I needed it in uppsrc (so that theide compiles from uppsrc), so moved it to plugin/md....
Re: [Proposal] Markdown to QTF converter/parser [message #56184 is a reply to message #56183] Thu, 04 February 2021 17:22 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Quote:
It is now used in UppHub to display README.md. Unfortunately, to do that, I needed it in uppsrc (so that theide compiles from uppsrc), so moved it to plugin/md....


OK, Do I have commit access? I'll commit the missing bits (styles, at least.) in this weekend.

Best regards,
Oblivion


Re: [Proposal] Markdown to QTF converter/parser [message #56186 is a reply to message #56184] Thu, 04 February 2021 20:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
You should have commit access now.
Re: [Proposal] Markdown to QTF converter/parser [message #56187 is a reply to message #56186] Thu, 04 February 2021 21:03 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
OK, thanks!

Best regards,
Oblivion


Re: [Proposal] Markdown to QTF converter/parser [message #56851 is a reply to message #53137] Wed, 21 April 2021 10:13 Go to previous message
Oblivion is currently offline  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







[Updated on: Wed, 21 April 2021 10:50]

Report message to a moderator

Previous Topic: How does one get argc and argv parms when making use of GUI_APP_MAIN?
Next Topic: U++ and Vulkan SDK
Goto Forum:
  


Current Time: Thu Jun 13 14:47:40 CEST 2024

Total time taken to generate the page: 0.01200 seconds