Query to access inline memo content

This post was last updated for 214 days ago, and the information may already be changed

Hi dear community,

Inline memos are annotations that can be added to inline text. While I know how to access via SQL block memos, I can't see how to get at inline memos. I would like to be able to access them from e.g. database template columns.

The dev view within SiYuan shows that the memo content is inserted as a span data-inline-memo-content attribute, e.g. here it is :::DEP

<!-- this is surrounded by two spans with data-type `a` containing the rest of the anchor
text, I just annotated an arbitrary substring for demonstration -->
<span data-type="a inline-memo" 
data-href="https://guild.systemcrafters.net/courses/guile-beginners/0424/" 
data-inline-memo-content=":::DEP">ters Guile Scheme course April 202</span>

I can get all such spans via this SQL query (thanks to the excellent widget-query plugin!)


select * from spans where type like '%inline-memo%'

However, for the previous span the content field returns the annotated text ters Guile Scheme course April 202 concatenated with the text that annotates it, here :::DEP

`ters Guile Scheme course April 202:::DEP`

The markdown field shows no trace of the annotation.

How can I cleanly extract the string :::DEP, without having to introduce a separator convention (e.g. :::) and do string processing to get at the memo?

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...