Skip to content

Clipping & Templates

Clipping sends what you are reading into your Logseq graph: the text you selected, or the link of the page. A template decides what the new block looks like and which page it goes to.

  • Keyboard shortcut: press Ctrl+Shift+U. You can change it in the browser’s shortcut settings, the command is called Make Clip note. With text selected it clips the selection. With nothing selected it clips the page link.
  • Right-click menu: right-click selected text and choose Clip “…”, or right-click the page and choose Clip page link.
  • Sidebar: click the toolbar icon to open the sidebar, then Clip page to clip the link of the current page, or Clip selection to clip the text you selected on it.
  • Floating button: a small Logseq button that follows your text selection. It is off by default. Turn it on in the options under Settings, Clip Note, Floating Button.

A clipped selection is converted to Markdown first. Links, lists, code blocks and images keep their shape in Logseq. It is also saved as a highlight on the page.

The block is added to the end of a page of your graph, chosen by the template’s Save to:

  • Journal: the journal page of today.
  • Current page: the page that is open in Logseq right now. On the Journals home, where no single page is open, the clip goes to today’s journal.
  • Page…: a page you name.

Open the extension options and look at the Templates list in the sidebar.

  • Click + to add a template, and click a template to edit it.
  • Drag a template by its handle to reorder the list. Hover a template to show its delete button.
  • Clipping uses the first template in the list. To clip with another one, drag it to the top.

A template has a name, where it saves (Journal, Current page, or Page… with its page name) and the content of the block.

The default template is:

#[[Clip]] [{{title}}]({{url}})
{{content}}
Variable Value
{{title}} The title of the page
{{url}} The address of the page
{{content}} The selected content, as Markdown. Empty when you clip a page link.
{{date}} Today’s date, in the date format of your Logseq
{{time}} The current time, as HH:mm
{{dt}} The current date and time as a date object, for filters

Write tags and properties in the template itself, the way you write them in Logseq: #Tag or #[[Tag Name]] in a block, and key:: value lines under the first line of a block. The Reading note template has two properties:

- [{{title}}]({{url}})
source:: {{url}}
date:: [[{{date}}]]
- {{content}}
  • File graphs read the tags and properties from the text of the clip.
  • DB graphs make the tags real tags of their block. A property line becomes a property of the block: your property of that name, or a new one. A new property is a date when the value is {{date}}, a URL when the value is a URL, and text otherwise. A value that does not fit the type of your property stays in the block as text.

Only what the template writes counts. A # or key:: in the page title or the clipped text never becomes a tag or a property.

While you type, the template editor offers the property names and tags of your graph, and the variables that fit a property’s type.

Templates are written in LiquidJS, so you can use filters and conditions. For example, {{ dt | date: "%Y-%m-%d %H:%M" }} writes the date and the time in your own format.

Double brackets in the clipped text ([[, {{ and (() are escaped, so a clip does not create links or macros in your graph by accident.