mrjackphil / obsidian-text-expand

A simple text expand plugin for Obsidian.md
186 stars 12 forks source link

Feature Request: retrieve content of blocks #50

Closed chrisgrieser closed 2 years ago

chrisgrieser commented 3 years ago

Thanks for the plugin!

Right now, we can retrieve block ids, and we can retrieve note content. Is it possible to retrieve content of blocks as well? Like specifically only the blocks that match a search.

block:(#test1)
$blockcontent

This could, for example, only retrieve the blocks that have the tag #test1.

quowarranto commented 2 years ago

Second this request. This is the use case that led me to this plugin.

kabo1234 commented 2 years ago

+1 for this!

and even better if the blocks could be retrieved as embeds (rather than copied) or as text+link (eg [[source]]. That way there would be a discernible link to where the block came from.

ghost commented 2 years ago

Thank you so much for this plugin: I would love to see this working with headers as well: [[mynote#headercontent]] I love the pasting in this note because I can now use it to publish the embed as html

mrjackphil commented 2 years ago

@chrisgrieser You can try to use $matchline which will return the matched line.

mrjackphil commented 2 years ago

So, currently you can use: $matchline to get matched line. If you search for block: it will retrieve the content of the block. $blocks which will return link to the blocks !$blocks which will return embeds for blocks

If there are still issues with it - please, reopen the issue.