turtl / tracker

This project is for tracking issues, bug reports, and progress on the entire Turtl project.
67 stars 3 forks source link

Allow opening external program for editing notes #202

Open bashfulrobot opened 6 years ago

bashfulrobot commented 6 years ago

I was reading the FAQ about the reasons for markdown. While I prefer markdown, maybe a way to approach this is to have an option to compose/edit in an external markdown editor.

Workflow

That allows the freedom for people to use any editor they like (some have some great editing capabilities). And offloads the requirement to maintain an editor for you.

l4mbd0x commented 6 years ago

Indeed, this flexibility is desirable. However, Turtl would trade off maintaining an Markdown editor for the problem of handling an API to send/receive data to any app editor (including ways to handle editor's failures). Still, it is feasible.

orthecreedence commented 6 years ago

I love the idea. However, this is fairly difficult to do with Turtl's security promise. Temporary files with unencrypted data laying around are pretty far outside the goals of the project. This would have to be done using some kind of inter-app communication (probably via http, like the bookmarking extension). And at that point, I'm not sure how you'd get the editor to talk to the Turtl app without some kind of extension in the editor itself. This needs some very careful thought.

In the meantime, we are planning on implementing some form of WYSIWYG editor (#38) that might satiate users' needs for a better editor than a simple text box (for the time being at least).

bashfulrobot commented 6 years ago

Thanks for the responses!

mutagenfork commented 6 years ago

You might want to look at how qutebrowser does it:

https://www.reddit.com/r/qutebrowser/comments/780u6a/how_to_set_vim_as_qutebrowser_editor/?st=jnacy042&sh=2e7dc152

https://github.com/qutebrowser/qutebrowser

orthecreedence commented 6 years ago

@mutagenfork Can you give a little more explanation? It's not immediately obvious from the links how qutebrowser loads the editor and if it does so in a way that works within Turtl's security model.

mutagenfork commented 6 years ago

I don't know enough about Turtl to say whether it will fit with Turtl's security model. I just know that the mechanism works well for editing Turtl's config file and text fields in the browser:

Here's the code which I'd guess does most of the work:

https://github.com/qutebrowser/qutebrowser/blob/03ac3b4d7db0795abe1c2f851e3e7c9f865d98ab/qutebrowser/misc/editor.py

orthecreedence commented 6 years ago

Thanks, I'll take a look!

bashfulrobot commented 5 years ago

I have since moved onto other software. Please feel free to close it you wish.