danielo515 / obsidian-modal-form

Define forms for filling data that you will be able to open from anywhere you can run JS
https://danielorodriguez.com/obsidian-modal-form/
MIT License
187 stars 14 forks source link

[Feature request] support the URL scheme/Obsidian URI standard. #229

Open zeltak opened 6 months ago

zeltak commented 6 months ago

Is your feature request related to a problem? Please describe.

I love using obsidian-modal-form and recently discovered this amazing little plugin obsidian-create-task

https://github.com/simonknittel/obsidian-create-task

in many sense the perfect companion for obsidian-modal-form :)

in very cool thing that it supports is the use of the URL scheme/Obsidian URI standard. Using this url (obsidian://create-task) will automatically start Obsidian and open the modal!

Describe the solution you'd like I thought it would be amazing if obsidian-modal-form can also support such a scheme so that some of the modals I create would already be pre filled!

Additional context Thank you so much for considering!

danielo515 commented 6 months ago

Hey @zeltak, thank you for putting this feature in my radar. However, the ability of modal-form to create new notes is limited. Are you currently using that feature? I will be surprised if you do.

The point I'm trying to make is that, the main use-case of modal forms is to be a side-car plugin for other more capable plugins like templater, quickAdd or CJS, which means that it is not meant to be called directly but from other plugins. Does that make sense?

The usual flow of modal forms is:

  1. Be called by another plugin that wants some data
  2. present a form to the user and collect the data
  3. return the data to the original caller

In the case of opening a form from a url scheme the points 1 and 3 are missing. How do you expect this to work exactly? One possible workaround is:

Have you considered that as a viable workaround?

zeltak commented 5 months ago

thx @danielo515 ! will explore this soon

Z