On Saturday, April 22, 2023 at 5:51:13 PM UTC-4 Edward K. Ream wrote:

On Sat, Apr 22, 2023 at 3:26 PM Thomas Passin <[email protected]> wrote:

I've made a little progress.  That unicode character  - 0xfffc - is only a 
marker and does not carry any information about the image. 


Iirc, the lack of identifying data with the 0xfffc character was why I 
abandoned this project years ago. It would be natural to allow body text to 
contain more than one image. Ordinary editing operations could change the 
order in which those images appear (or, as you say, delete images).

You're correct, Leo could use uAs to associate images with 0xfffc 
characters *initially*, but I see no good (easy) way of *maintaining *those 
associations after *all* of Leo's editing operations.


In principle, there could be a way, but I don't know how practical it would 
be.  We have the widget give us the md (or html) version and search through 
it for all the image tags.  This gives us the resource identifiers and the 
0xffc characters in serial order through the document.  Back in the text 
view, we can find them all and insert the images in order where their 
markers are.  There ought to be a less hacky way to do this, but I haven't 
found anything yet on stack overflow etc, or in the api docs.  It's 
probably there somewhere if I can grasp what it all means.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/48cf0ff5-eb41-4fc4-8f94-71e4b864daaen%40googlegroups.com.

Reply via email to