omnibear icon indicating copy to clipboard operation
omnibear copied to clipboard

Edit Support When Viewing Authenticated Site

Open grantcodes opened this issue 7 years ago • 5 comments

I don't know why I didn't think about doing this yet but omnibear is able to tell when you are viewing your own website, so you should totally be able to click on one of your own posts and delete or edit it

grantcodes avatar May 13 '18 06:05 grantcodes

I managed to add delete support to a personal build really easily, editing will be much more difficult.

You can see the delete changes here: https://github.com/grantcodes/omnibear/commit/edc2013442dfc602500311493af2a92755bdd36e

I've not submitted a pull request because I had code formatting turned on and changed a whole load of junk, but I can tidy it up and make a pull request. It would just need a svg icon matching the other two

grantcodes avatar May 13 '18 07:05 grantcodes

Yeah, I’d love to get editing working, but the question of formatting is tricky. Do we convert to markdown or leave as raw HTML? (or something else?) I have a feeling this would need to vary based on a particular site’s use case.

keithjgrant avatar May 14 '18 14:05 keithjgrant

I didn't even think about that issue.

In a basic case it could always just support replacing properties, with no need to pull the existing microformats from the site.

Actually now that I am thinking about it, it would absolutely be possible to use contenteditable in an extension to edit microformats posts inline since they are html. That would be a game changer actually! I may need to look into that...

grantcodes avatar May 14 '18 16:05 grantcodes

For formatting, why not pull the editable content from the micropub endpoint instead of using the parsed version from the page?

sknebel avatar May 14 '18 16:05 sknebel

Ooh, I didn’t realize you could fetch the HTML content from a micropub endpoint. That’s handy. Of course, editing HTML is trickier business than, say, markdown. But it should be do-able.

keithjgrant avatar May 14 '18 16:05 keithjgrant