GitMurf / roam-highlighter

Chrome highlighter that quickly and easily puts your highlights into Roam format for easy pasting into your notes.
MIT License
340 stars 28 forks source link

Obsidian setting using <h1> HTML tags instead of # markdown syntax #55

Open ayrtonoropeza opened 4 years ago

ayrtonoropeza commented 4 years ago

In order for the app to work more seamlessly with Obsidian, it should copy headers using markdown syntax #, instead of <h1> tags when using the Obsidian setting.

Steps to reproduce

  1. Open the extension and select the Obsidian preset
  2. Enter a website and copy a couple of headers

Expected result

# Header 1
## Header 2
### Header 3

Actual result

<h1>Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>

While Obsidian recognizes HTML tags, this is not ideal, since Obsidian is markdown-oriented and it it will only render HTML headers in preview mode, and not in edit mode.

image

image

The best way to indicate something is a header is using #. That way, it will render as a header in edit mode too.

image

GitMurf commented 4 years ago

@ayrtonoropeza good idea and point of feedback. I have it on my list to do but I haven't been able to spend much time developing in the last couple months due to work being busy.

GitMurf commented 4 years ago

@ayrtonoropeza sorry just getting around to development again on my highlighter. I saw your post in obsidian forums as I never got notified via email about new posts for some reason and now am going back through them all. I will keep you posted!

https://forum.obsidian.md/t/web-clipper-highlighter-and-kindle-highlights-notes-extraction-extension/852/44?u=smurfman111

I just wanted to make a suggestion: in order for this to work more seamlessly with Obsidian, the extension’s clipboard should convert html header tags into markdown syntax when using the Obsidian preset. Right now, it is copying headers as

Header

, but Obsidian works better when you use the markdown syntax, which is # Header 1. That way, the title will render in both edit and preview mode. I left a feature request in GitHub with screenshots and more details.

I’ve never used Roam, but I’m guessing there’s a reason to use the html syntax there. I just hope you can include this html-to-markdown conversion for Obsidian without messing with the default Roam mode. Thanks a lot in advance!