Custom command/shortcut for a code snippet

Hi,

in order to add a page break into a note, that creates a page break in a PDF, I found this thread:

Now the question I have:
How can I somehow easily create a shortcut or some command to insert that line of code into my notes? Is there a recommended way of getting this done?
I don’t want to copy&paste it each time.

Thanks a lot!

Br
TU

There are two common ways:

  • Templater plugin (after enabled go to its settings → Template hotkeys)
  • QuickAdd plugin (after enabled go to its settings → then add a Capture choice)

Thanks for your quick reply :slight_smile:

You are talking about these 2, am I correct?
Templater: GitHub - SilentVoid13/Templater: A template plugin for obsidian
QuickAdd: GitHub - chhoumann/quickadd: QuickAdd for Obsidian

Thanks again!
TU

Yes these links are correct. I’m willing to help if you have problems using these plugins.

1 Like

thanks a lot for offering your help :slight_smile: Really appreciated!
I was trying it myself and after having had a look at a Youtube video, I understand now much better the concept and ideas behind Obsidian and how to use it.

I am using “QuickAdd” now , btw.

Br
TU

1 Like

I have created a code-snippet for page breaks (wont show up when you export to PDF) and should honour your theme. Hope it’s helpful!

page-breaks.css (547 Bytes)

2 Likes

forgot to add I just used this <div style="page-break-after: always;"></div> from Page Breaks for PDFs - #3 by DudeNamedBen

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