I’m trying to render a part of another page between two horizontal lines that contains a specific tag.
content with #tagA
content with #tagB
- [ ] Might also include todo list etc
Since this is not a list, taskList or table. How can I render this content?
dataviewjs, how do I get the raw file content or HTML elements for a dv.page() object? (so that I can process that in JS myself?)
Ps, I read in the docs there is
async dv.io.load(), but that feels way to heavy if I already have a Page object.
Manually, through text manipulation.
You’ll need to write and scan through the lines yourself. You could possibly use some document query selectors to get you partially there.
AlanG has provided some scripts presented in this forum for getting sections related to headers, which might be a good starting point.
Thank you holroy for your pointer to AlanG his posts!
I now have something working with
async dv.io.load(), but I really don’t like it from a code cleanness point of view. Feels like too much overhead, but then again, it’s an Electron app, maybe I’m to oldskool
Apparently the next step, embedding the retrieved Markdown content, also seems a challenge in
dataviewjs, see Issue 177. Some routes others tried.
Funny enough I was already playing with loading Showdown.js, which makes it even worse from a code cleanness point of view.
Never looked into creating a plugin, but that might be the only clean route?
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.