Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Contents as new magic command #390

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ChiIIBiII
Copy link

Hi, I don't know if this feature is wanted or not, but I used it myself and wanted to share. It's a simple extension to have the note's content available as the @content magic command. This is a swiss army knife (if admittedly an a bit cumbersome one) to process your note's content. You can do table processing, read data from your lists, access any html ids you create, etc. Unfortunately obsidian block ids don't show up in the html. Other extensions also have issues with this (see eg here). I decided to pass the rendered html instead of the raw markdown string because most programming languages have better support for parsing and postprocessing html dom.

Some examples of how it looks like:

image

image

@twibiral
Copy link
Owner

twibiral commented Dec 14, 2024

Oh, thats an amazing idea! Thank you a lot, I will add it with the next release :)

Edit: We could also do two commands, one for markdown and one for html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants