seanlowe / obsidian-timelines

Create a timeline view of all notes with the specified combination of tags
https://seanlowe.github.io/obsidian-timelines/
MIT License
39 stars 2 forks source link

No body in timeline event created via frontmatter #48

Closed enigmartyr closed 4 weeks ago

enigmartyr commented 4 weeks ago

when I generate the frontmatter event with ctrl + P it gives a lot of properties, one of which is description. This seems to do nothing, and there's no other property that seems like it would equate to a body of text.

When I do inspect elements I can see that there is a p element, which looks like it should have been populated with something?

image image

I think this may be the issue? https://github.com/seanlowe/obsidian-timelines/blob/1a573b4e5834c75ccc03c49d53b62ef95bfd9f01/src/block.ts#L306

innerText is only set if you create an event the HTML route rather than the frontmatter route

https://github.com/seanlowe/obsidian-timelines/blob/828f0309a056f510705372788c638e5d88d9cb0f/src/utils/events.ts#L76

the getEventData function calls retrieveEventValue in order to acquire the various properties which differ in arrangement between HTMLElement and FrontMatterCache. But it doesn't store the event body, this should be an oversight rather than a technical or design limitation, right? The frontmatter event generates with a description property that seemingly does nothing.

enigmartyr commented 4 weeks ago

I manually edited the plugin in a few spots within my plugin folder and it works now

enigmartyr commented 4 weeks ago

image image image

enigmartyr commented 4 weeks ago

pull request submitted: https://github.com/seanlowe/obsidian-timelines/pull/50