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
238 stars 42 forks source link

Add API for use by other plugins #209

Closed jonathanvanschenck closed 4 months ago

jonathanvanschenck commented 4 months 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 4 months 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 4 months ago

Thanks

tim-hub commented 4 months ago

@all-contributors please add @jonathanvanschenck for code

allcontributors[bot] commented 4 months ago

@tim-hub

@jonathanvanschenck already contributed before to code

jonathanvanschenck commented 4 months 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