No description
Find a file
2020-12-05 10:24:46 +01:00
src Places the cursor back to where it was 2020-12-05 10:17:52 +01:00
test Adds toggling for sentences 2020-12-05 10:13:04 +01:00
.gitignore .DS_Store banished! 2020-11-20 12:56:18 +01:00
clipboard-flow.gif Updates gif 2020-11-08 16:22:18 +01:00
cursor.gif Adds readme and demo 2020-12-04 12:52:46 +01:00
data.json Fixes watching mocha 2020-12-04 19:54:11 +01:00
flow_links.gif Adds animation 2020-12-04 14:26:28 +01:00
main.js Places the cursor back to where it was 2020-12-05 10:17:52 +01:00
manifest.json Adds toggling, bumps version, adds demo 2020-12-05 10:24:46 +01:00
onoff.gif Adds toggling, bumps version, adds demo 2020-12-05 10:24:46 +01:00
package.json Fixes watching mocha 2020-12-04 19:54:11 +01:00
README.md Adds toggling, bumps version, adds demo 2020-12-05 10:24:46 +01:00
rollup.config.js Adds plugin settings for heading 2020-11-20 10:03:57 +01:00
styles.css Adds sentence-level highlighting under cursor 2020-12-03 17:29:59 +01:00
tsconfig.json initial commit 2020-11-08 14:47:29 +01:00
tsconfig.testing.json Adds toggling for sentences 2020-12-05 10:13:04 +01:00
yarn.lock V0.0.2 with suggested improvements from https://github.com/obsidianmd/obsidian-releases/pull/41 2020-11-14 11:36:41 +01:00

Extract Highlights Plugin

Extracts all highlights from a current note in Obsidian into your clipboard. Based on icebear's plugin request.

Are you using Extract Highlights? I'd love to hear from you!

Share your questions and suggestions in the forum

How it works

This plugin will copy the highlights delimited by ==, ** and <mark></mark> into your clipboard as a bullet-list.

Optionally you can customize...

  • The heading text of the list, include the note-title or hide it all-together
  • Adding a footnote to each that link back to the source-file
  • Creating an ad-hoc map-of-content (MOC) by turning each highlight into an [[ Obsidian link ]]
  • Auto-capitalize the first letter in each highlight for consistency

Demo

basic functionality

Using the Hotkey to EXTRACT highlights

The default hotkey is:

SHIFT + ALT + =

Using the Hotkey to HIGHLIGHT (and UN-HIGHLIGHT) the sentence under cursor

The default hotkey for this is:

SHIFT + ALT + _

Super useful for when you're reading and just don't want to switch to your mouse for selecting the sentence.

Will remove highlighting if the sentence under your cursor is currently delimited by "==".

Using the Ribbon Button

There is also a button (a circle-shape) that's added to your left-side ribbon.

Clicking on it will also extract all highlighted parts in your current note and place it in your clipboard.

Using the Command Palette

I looked into it and theres a bug the way clipboard works with the Command Palette. Basically everything but the “Paste” works.

But Ive found a temporary work-around. Its weird but it works.

  1. Trigger Command Palette (Command-P)
  2. Find “Extract Highlights”
  3. Hit Enter (You should see a notification (“Highlights copied to clipboard!”)
  4. Workaround: At this point, briefly switch to a different note and back (This materialises the clipboard data for pasting)
  5. Paste works now the same as with the Hotkey and Button-press

Pasting highlights from your clipboard

After using the hotkey, button or command palette, anywhere you want, just paste the clipboard!

Command + v (MacOS) or the equivalent on Windows/Linux

The output is a markdown-block titled "Highlights" with a bullet-list of the highlights.

Backlog

UI

  • command (SHIFT + ALT + =) which then copies all of the highlighted text either into:
  • click a button which then copies all of the highlighted text either into:
  • allow for <mark></mark> to be used as highlights
  • allow for standard bold (**) to be used as highlights
  • allow to optionally include or completely exclude ## Highlights heading
  • allow to change text in heading ## My Custom Highlights
  • allow to include note-name in heading such as ## From: $NOTE_TITLE
  • allow to add footnotes for each highlight and include link to source-note
  • allow to optionally enable bold for highlights
  • allow for Command Palette to trigger copying (Works sort of, bug in Electron)

Outputs

  • my clipboard
  • the top/botton of the note and selected for a next step,
  • a designated area in the note such as {{highlights}}, or
  • a new note