Quoth
approvedby Eric Rykwalder
More flexible embedding. Embed precise selections, inline embeds, optionally include author and title.
Quoth Plugin
This a plugin for Obsidian that allows embedding from other markdown files with greater flexibility than the standard embed syntax.
It allows:
- Embedding parts of a single block
- Embedding multiple parts in one "quote"
- Inlining the embed so it aligns with other content
- Automatically adding source author and title to the embed
Copying References
The simplest way to use the plugin is to use the copy reference command.
This will take a selection from source mode or preview mode
and copy a qouth code block into your clipboard
that can be pasted in other documents.
The hotkey for this is either Ctrl-Shift-' or Cmd-Shift-' depending on your OS.
Code Blocks
Code blocks can also be constructed manually, and some functionality requires it. All the fields in the code block can be seen below:
```quoth
path: [[Filename#Heading]]
ranges: "Hello " to "world.", "Foobar" to "Bizzbaz"
join: " -- "
display: inline
show: author, title
```
Fields
pathSyntax:
[[filename#subpath]]subpath syntax:
- A heading:
#Some heading- A block id:
#^blockid- A list item:
#-Some list itemDefault: None
Description: Required. The path to the content you want to include, formatted like an obsidian link. Additionally supports specifying a list item. Multiple headings or multiple list items can be chained in the subpath.
rangesSyntax:
range, rangerange syntax:
"text" to "text""whole quote"line:col to line:colafter "text"after line:colDefault: None
Description: A subselection of the path you would like to embed. Multiple ranges are joined by
,.
joinSyntax:
"string"Default:
" ... "Description: How to combine multiple ranges. This field is only used if there are 2 or more ranges specified.
displaySyntax:
embeddedinlineDefault:
embeddedDescription: How to display the embed.
showSyntax:
option, optionoptions:
authortitleDefault: None
Description: Whether to include the source author or title. Multiple options can be joined with
,.
Deprecated Fields
| Line | Syntax | Description | Default |
|---|---|---|---|
file | [[filename]] | Deprecated. Use path instead. The filename of a markdown file in internal link syntax. | None |
heading | #heading1#heading2 | Deprecated. Use path instead. The parent headings of an embed. These are case sensitive. Multiple can be chained for greater specificity. | None |
block | ^blockid | Deprecated. Use path instead. The block id containing the quote. | None |
Limitations
There are currently some limitations to the current implementation:
- Copying from preview mode only works if the underlying markdown can be reconstructed. Things like mathjax are not currently handled. You can always copy from source/live mode.
- The embedded content cannot contain another quoth code block, because that could lead to infinite recursion.
- Rendering relies on an async call to Obsidian's renderMarkdown API, so embeds relying on postprocessing (like other embeds) will not work.
- It is for display only. It cannot do things that would update the original source, like checking checkboxes.
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.