obsidian-ketcher icon indicating copy to clipboard operation
obsidian-ketcher copied to clipboard

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

Open Comprehensive-Jason opened this issue 2 years ago • 4 comments

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

  • [ ] Embed Markdown Preview for KET files
  • [x] Add Hotkey to save (autosave feature added instead)
  • [x] Customize Save Folder

Comprehensive-Jason avatar Apr 28 '23 00:04 Comprehensive-Jason

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

Acylation avatar Aug 03 '23 18:08 Acylation

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).

yulei-chen avatar Aug 07 '23 03:08 yulei-chen

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

Acylation avatar Aug 09 '23 08:08 Acylation

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

Comprehensive-Jason avatar Aug 21 '23 15:08 Comprehensive-Jason