Today in Things I Should Have Done Ages Ago... I finally started adding support to Quill for editing posts. I'm going to have to build this out one by one for each post interface Quill supports, so I started with the easiest one, favorites.
Eventually I will add an "edit" button to my bookmarklets, which is currently how I access most of Quill for writing posts, replies, bookmarks, etc.
(I used to have cute icons there, but they disappeared long ago during some syncing process in Chrome.)
The bookmarklet will have code like the below:
javascript:(function()%7B window.location = "https://quill.p3k.io/edit?url=" + encodeURIComponent(window.location.href) %7D)();
The "/edit?url=" route in Quill does a Micropub query for all source properties, and inspects which properties come back. Depending on which properties are present, Quill then redirects to the appropriate editing interface based on the type of post it detects. For example, if it sees a "like-of" property in the post, then it redirects to "/favorite" with the post's URL in the query string.
The "/favorite" page then does a Micropub query for the specific properties it will edit (in this case, only the "like-of" property), and fills the URL in the form. When you click "Save", it makes a Micropub edit request to replace the value of the "like-of" property.
I'll be making more (slow) progress on adding editing support to the rest of the interfaces!
cool! can’t wait to see someone use this with a WordPress site!