Line Template Palette

Problem

When I enter my notes, I embed online content in between paragraphs. Since there are different types of content that I embed, I have to re-enter the same line of <iframe></iframe> but with small changes each time.

Some lines I frequently use:

For embed-only YT videos:
<iframe width="420" height="236" src="https://www.youtube.com/embed/(video ID)?&rel=0" frameborder="0" allowfullscreen></iframe>

For large embed-only YT videos:
<iframe width="720" height="480" src="https://www.youtube.com/embed/(video ID)?&rel=0" frameborder="0" allowfullscreen></iframe>

For embed-only YT videos with timestamp:
<iframe width="420" height="236" src="https://www.youtube.com/embed/(video ID)?&rel=0&start=30" frameborder="0" allowfullscreen></iframe>

For large webpage embeds like my Goodreads book reviews (I use them for my book notes. I like to embed the webpage itself so I can quickly access Goodreads if I want to edit something other than the current book):
<iframe src="(webpage URL)" style="border: 0" width="750" height="590"></iframe>

As you can see, they’re almost all the same and so it’s a hassle to enter them each time. This isn’t limited to <iframe></frame>.

Solution

By having a line template palette with a hotkey, it’s easier and quicker to enter lines of specific text that you frequently use. To add to that, it would be better if you could name each line template so it’s easier to search for them in the palette.

I believe this can replace the insert template function since it’s used at the line level (versatile).

Current workaround (optional)

I have a separate file tab open where I keep all the line templates which I then copy and paste to the active tab.

I use the Templater plugin for things like this. Make a template for each one, then alt+e, or whatever your hotkey is, pick the right template, and it inserts it. Then change what you need to, and it’s done.

Ah, so it already works like that. My mistake. Thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.