Skip to content

Enhances Obsidian's right-click menu and global command with direct links to blocks and titles, adds support for multi-line blockquotes, and offers extensive customization options for block IDs.

License

Notifications You must be signed in to change notification settings

Jasper-1024/block-link-plus

 
 

Repository files navigation

Block Link Plus

copy-block-link is one of my most frequently used plugins. However, it has always lacked support for creating multi-line text blocks. Therefore, I attempted to write block-link-plus. block-link-plus supports the creation of multi-line text blocks and offers more customization for block IDs.

for chinese version, please refer to README_zh.md

Usage

The usage is completely the same as copy-block-link.

image

Features

Multi-line Text Blocks

Here, multi-line text specifically refers to: selected text that does not contain any titles across multiple lines.

Obsidian's block reference has not yet supported the creation of multi-line text blocks. block-link-plus uses two methods as a workaround.

The first method is using headings: adding the selected text to a new heading and copying the link pointing to that heading.

  • Distinguish using ˅id from normal headings
  • Modify the rendering of ## ˅id under reading mode and live preview to make it more similar to a normal block reference.
## ˅id
abc
def
## ^id

[[file#˅id]]

The second method creates multiple block references: batch creating multiple sets of block references and copying them to the clipboard

abc ^id1

def ^id2

gh ^id3

[[file#^id1]]
[[file#^id2]]
[[file#^id3]]

Custom Block ID

Block ID = prefix-random characters

  • Customize the prefix of the block ID and the length of random characters (3-7)

This feature currently does not have more practical uses, but perhaps more aggregation operations can be performed through the prefix of the block ID.

License

Block Link Plus is released under GNU GPLv3 (License).

Thanks

Block Link Plus is my first Obsidian plugin. During the development process, I referred to a large number of existing plugins. I am grateful to these open-source projects.

About

Enhances Obsidian's right-click menu and global command with direct links to blocks and titles, adds support for multi-line blockquotes, and offers extensive customization options for block IDs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.3%
  • JavaScript 6.2%
  • CSS 0.5%