yuleicul / obsidian-ketcher

View or draw chemical structures and reactions using Ketcher.
https://obsidian.md/plugins?search=yulei%20chen
Apache License 2.0
32 stars 2 forks source link

FRs: Embed File Previews, add 'Save' Hotkey, customize save folder #1

Open Comprehensive-Jason opened 1 year ago

Comprehensive-Jason commented 1 year ago

I love the potential of this plugin. I'm studying Chemistry now and this plugin is shaping up to be a godsend. I think adding the following features would make this plugin even more amazing.

Features

Embed Markdown Preview for KET files

Currently, when I try to embed a Ketcher file, I only see a blank box. image

I would love for the plugin to show markdown preview images, similar to the Obsidian Excalidraw plugin: image

This would make using Ketcher way easier, as users could look at their chemicals at a glance.

Add Hotkey to save

Could you make the keys Ctrl + S also save the file, like the save button?

Customize Save Folder

Could you allow the user to choose which folder to save their Ketcher files into?

Progress

Acylation commented 1 year ago

Would like to work on hotkey save and render embed. Need some time to get through the Ketcher API.

yuleicul commented 1 year ago

Ctrl + S is a good idea but I need to take a look at obsidian APIs. FYI, automatic saving every 2 or 3 seconds is what I planned to implement (https://github.com/yuleicul/obsidian-ketcher/issues/2).

Acylation commented 1 year ago

For hotkey I thought about the registerDomEvent(), and for the autosave it should be registerInterval(). I will submit a draft PR later today.

Comprehensive-Jason commented 1 year ago

@Acylation Thanks so much for adding autosave! I've checked the save hotkey request off my post, as autosave is kinda better.