Plugin: Embedded Notes

Embedded Notes enables referencing the full content of other notes within the current note using placeholder tokens. Useful for managing reusable snippets or keeping information up to date across multiple notes.

This plugin is in beta and hasn’t been published to the Joplin plugin list yet. Please follow the manual installation instructions below.

Feel free to leave feedback in the comments below. For specific feature requests or bug reports, please use the issue tracker.

Screenshot

screenshot.png

Usage

[!CAUTION]
Using the Rich Text editor will overwrite all tokens with embedded content when saving documents. To preserve tokens, always use the Markdown editor.

Referencing Notes

To reference the content of another note, use the following syntax:

%^Title of Another Note^%

This will display the content of the note titled "Title of Another Note" in the markdown viewer.

Alternatively, reference a note using its ID:

%^4a7fbc2e5d9a36e10cf8b4d7ea12c390^%

[!NOTE]
Attachments (images, videos, audio, and PDFs) are not rendered by default. To enable rendering, activate Show resources under Show Advanced Settings. This setting is experimental and may cause display issues.

Installation

Manual

  • Download the latest .jpl file from releases.
  • Open Joplin and navigate to Tools > Options > Plugins.
  • Click the gear icon and select Install from file.
  • Choose the downloaded .jpl file and restart Joplin.

Known issues and limitations

  • Rendering Tokens: Tokens may not update immediately when switching between notes or upon loading the application. Editing the note or quickly switching between notes will trigger the tokens to render.
  • Token Naming: Token names cannot contain the character sequence reserved for the opening and closing tags, or have spaces at the beginning or end. Use note ID tokens to reference notes with titles that include reserved characters.
  • Duplicate Titles: Only the first note found with a duplicate title is used. To avoid ambiguity, reference notes with duplicate titles using their unique note ID.
  • Nested Tokens: Nested token replacement is not supported.

Acknowledgments

This plugin is inspired by and builds upon features from the following projects:

Repository

See the README in the repository for full documentation.

5 Likes

Due to the way the plugin works, notes with tokens need to be edited before the content shows up in the markdown viewer. You can also try switch quickly between notes to display the content.

When a note is loaded, the referenced notes are loaded into localStorage after the note is rendered, so the content typically isn’t available for the viewer until the note is edited. I based this approach on the Note Variables Plugin, but if any developers have suggestions for improvement, I’d be happy to hear.

Unfortunately, since localStorage access is required, dynamic content rendering on mobile is not supported. (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)

On mobile, you can create a new note with embedded content by opening the note in the editor and selecting the Create new note with embedded content button from the editor toolbar.

Neat!

I wonder if you could allow the user to include both the unique hash as well as the note title. That way it's more meaningful. Another thought I had was that in the markdown editor it would be nice if clicking on the title opened the original note. Does that make sense?

Would something like this make sense?

%^4a7fbc2e5d9a36e10cf8b4d7ea12c390|Title of the original note^%

You could actually enter any text you'd like after the | (may need to use a different character since | conflicts with tables)

I can look into making the tokens clickable from the editor. There is an option to enable a side panel and footer links, to display a list of note titles with clickable links back to the original notes.

Thanks for your suggestions.

This has been implemented. You can now add any arbitrary text after the note id (except for reserved characters).

1 Like

Yeah, that's what I was thinking of. Cool.

1 Like

The plugin is now available through the official Joplin plugin registry.

  • Added support for replacing nested tokens.

Installation

Automatic

  • Open Joplin and navigate to Tools > Options > Plugins.
  • Search for "Embedded Notes" and click Install.
  • Restart Joplin to enable the plugin.
1 Like