Copy Section

approved

by skztr

Adds a Copy button to the top of Headed sections.

8 stars2,123 downloadsUpdated 2mo agoMIT
View on GitHub

Copy Section

This plugin adds a "copy" button to # Header lines within the document. Clicking the button will copy everything within that section (eg: up to the next # Header line of the same level). Data is copied as raw markdown.

Features

  • Allows you to easily copy entire sections
  • Optionally omit %%comments%% or lines containing only #tags
  • Copy all sub-sections, or only up to the next # Header line of any level
  • Choose which levels you want the copy button to appear on

Note on edge-cases

There are some ways in which %%comments%% and inline code interact which Obsidian itself is inconsistent about. Take for example the code:

%%comment `code A%%A`B%%B end

Editor View considers the comment to end at B%%B, while Reader View considers the comment to end at A%%A. This plugin does not attempt to make any decision on such cases. Because Obsidian is inconsistent, the plugin also considers such mixtures to result in undefined behavior.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.