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 #56851 is a reply to message #53137] Wed, 21 April 2021 10:13 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1093
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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Sun Apr 28 15:46:14 CEST 2024

Total time taken to generate the page: 0.02891 seconds