This plugin inserts a YouTube video link into the note from the selected text. The selected text can be a YouTube video link or just the video ID. If the selected text is empty, the clipboard text is used.
- Insert YouTube video link with thumbnail
- Customizable title text position (top, bottom, or none)
- Customizable title text prefix
- Multiple format types (standard, next, custom)
- Custom format with variables:
${img}
,${text}
,${url}
,${id}
,${description}
, and${newline}
- Select preferred image resolution for the YouTube thumbnail
- Option to include the video description after the video link
Supported link types:
- Regular YouTube videos (https://www.youtube.com/watch?v=0I_OPQQiYVU)
- YouTube Shorts (https://www.youtube.com/shorts/0I_OPQQiYVU)
- Shortened YouTube links (https://youtu.be/0I_OPQQiYVU)
- Just the video ID
0I_OPQQiYVU
- Key:
textPosition
- Type:
String
- Options:
top
,bottom
,none
- Description: Position of the title text relative to the video link.
- Key:
textPrefix
- Type:
String
- Description: Prefix to append in front of the title text (e.g.,
#
to make the title a header).
- Key:
formatType
- Type:
String
- Options:
standard
,next
,custom
- Description: Choose how the YouTube link should be formatted.
- Key:
customFormat
- Type:
String
- Description: Define your custom format using
${img}
,${text}
,${url}
,${id}
,${description}
, and${newline}
variables. Only used when "Custom Format" is selected above.
- Key:
preferredImageResolution
- Type:
String
- Options:
maxresdefault.jpg
,hqdefault.jpg
,sddefault.jpg
,mqdefault.jpg
- Description: Select the preferred image resolution for the YouTube thumbnail.
- Key:
includeDescription
- Type:
Bool
- Description: Include the video description after the video link.
- Select the text in your note that contains the YouTube video link or video ID.
- Use the toolbar button or menu item to insert the YouTube video link.
- The plugin will replace the selected text with the formatted YouTube video link, including the thumbnail and optional description.
If the selected text is https://www.youtube.com/watch?v=0I_OPQQiYVU
and standard format is selected, the plugin will insert:
[]
For demonstration purposes, I've chosen a random YouTube link about Joplin.
https://www.youtube.com/watch?v=0I_OPQQiYVU
-
YouTube link
- Paste the YouTube link
- Select it
-
YouTube video ID
- Paste the YouTube video ID, example:
0I_OPQQiYVU
- Select it
- Paste the YouTube video ID, example:
-
From Clipboard
- Copy YouTube video URL or video ID to clipboard
- Place the cursor where you want the video inserted.
Use the toolbar or
Tools | Insert YouTube Video
menu or Keyboard shortcut CTRL+J
The video will be inserted into the note:
- Open Joplin
- Go to
Tools
>Options
>Plugins
- Search the plugin
Insert YouTube Video
- Click
Install
- Restart Joplin
- Go to the Releases to download the plugin package
zip
file and unzip it. - Open Joplin, go to Tools > Options > Plugins.
- Click Manage your plugins > Install from file, select the previously unzipped
jpl
file. - Finally, restart the application.
The plugin is built using Webpack, which creates the compiled code in /dist
. A JPL archive will also be created in /publish
, which can be used to distribute the plugin.
To build the plugin, simply run npm run dist
.
MIT license