meld-cp / obsidian-encrypt

Hide secrets in your Obsidian.md vault
MIT License
544 stars 32 forks source link

Live preview option when editing decrypted notes #159

Open CWalshie opened 3 months ago

CWalshie commented 3 months ago

Hey folks,

Apologies if I'm missing something here, but it'd be awesome to be able to use Obsidian's live preview view when editing decrypted notes. I love having my markdown automatically render instead of just seeing the 'source' code (and of course the 'reading' view doesn't allow editing). Not sure whether this is easy or possible to implement but would be a big UX boost for me :)

Cheers!

meld-cp commented 3 months ago

Hey, yeh, it was a limitation of the editor view I was using... I have been working on an update...

If you are up for it, please make a backup of your vault and test v2.4.0-beta if possible.

CWalshie commented 2 months ago

Hey @meld-cp, thanks for the reply and beta link! I've been using the v2.4.0 beta for a week or so now.

meld-cp commented 2 months ago

Hey @CWalshie, thanks for testing, I'm glad it's working well for you.

  • As far as I can tell, there's no way to encrypt or ‘lock’ a file after I’ve entered the password and started editing — this was the case after setting the password as well. I can’t see a lock icon in the corner of the note, like with the previous version. I very well might be missing something obvious here.

Ah, yes, I must have forgotten to add the 'lock and close' option back in... I'll add it to the todo list... the workaround for now would be to close the note and run the 'Clear Session Password Cache' from the command palette (or close Obsidian, or wait for the password session cache to timeout).

  • After I’ve entered the password and started editing, the only option I can see related to the plugin in the context menu is to ‘Decrypt note’. Not sure if this is intentional as it seems the note is already decrypted inside of Obsidian?

Yeah, that might be a bit misleading, in this case 'Decrypt note' means 'turn it into a normal/unencrypted' note. Similarly, if you click on a normal note you should see an 'Encrypt note' option.

  • Live preview mode works really well! Love it. :)

🥳🤞

meld-cp commented 1 month ago

2.4.0-beta.2 adds a 'Lock & Close' command