tim-hub / obsidian-bible-reference

Take Bible Study notes easily in the popular note-taking app Obsidian, with automatic verse and reference suggestions.
https://antioch.tech/obsidian-bible-reference/
MIT License
221 stars 41 forks source link

Add API for use by other plugins #209

Closed jonathanvanschenck closed 1 month ago

jonathanvanschenck commented 1 month ago

This adds a globally accessible object which exposes the internal verse fetching/rendering functionality for use by other plugins.

I should mention, I don't feel strongly about the names of anything here, please feel free to critique and I'm happy to adapt!

jonathanvanschenck commented 1 month ago

It is allow worth noting, there is a current work around to accomplish this same task, however, it doesn't allow mutating the configuration (i.e. you can't pick an alternative version)

(await window.app.plugins.plugins["obsidian-bible-reference"].verseLookUpModal.getSuggestions("John 3:16"))[0]?.allFormattedContent)
tim-hub commented 1 month ago

Thanks

tim-hub commented 1 month ago

@all-contributors please add @jonathanvanschenck for code

allcontributors[bot] commented 1 month ago

@tim-hub

@jonathanvanschenck already contributed before to code

jonathanvanschenck commented 1 month ago

Actually this is my first time contributing -- I had added myself to the the contributorsrc as one of the commits, but it appears that I forgot to update the readme too -- apologies