Move backlinks from sidepanel into the document section (as in Roam)

I would love to have this (back again), but I get this error…


Uncaught TypeError: Cannot read property ‘setAttribute’ of null at :5:15 at :8:3

Any idea what I can do about it?

I don’t know enough about JavaScript and JavaScript for Automation to know how to set this up offhand, but Keyboard Maestro would provide an easy way of running JXA whenever you activate Obsidian:

Any idea what I can do about it?

You need to have the backlinks panel activated somewhere, otherwise the JS snipped does not find it. I have it in the collapsed sidebar on the right. Do a F5 or CMD+R before running the code just to make sure.

Boom! Did the trick, nicely nice. Thanks @mark1nhu

1 Like

Just wanted to say this is insane.

I played around with the CSS a bit to make it a bit more inline with the document. Looks even better. The CSS below is smart enough to apply this only to this hacked view, so if you want to keep your regular styles for sidebar viewing you can


.CodeMirror-lines > .view-content > .backlink-pane > .side-dock-collapsible-section-header {
    padding-left: 0px;
    font-size: 20px;
    font-weight: 700;
.CodeMirror-lines >.view-content > .backlink-pane .search-result-container {
  padding: 0px !important;

.CodeMirror-lines >.view-content > .nav-header > .nav-buttons-container {
  position: relative;
  float: right;

.CodeMirror-lines > .view-content > .backlink-pane {
  clear: both;


A post was split to a new topic: Need help formatting button CSS in Obsidian

Did anybody of you find a way to enable this in multiple panels? I’m on Andy v2 and would love to have this hacky workaround under every note.

Would appreciate any hints!

1 Like

Do the backlinks disappear for anyone else after entering the graph view?

hey guys,

Does this still work for version 0.9.7 I’m aware the javascript version is no longer working

I tried the css method, but pressing the button in preview mode doesn’t do anything for editing mode in my case.


Did a plugin for it. Should be a part of Community Plugins soon.

Yep, it’s already in Community Plugins


Are Community Plug-ins available directly in the Obsidian ‘app’ or to be downloaded from GitHub?

1 Like

They are available directly from app. Obsidian 0.9.9

1 Like

The plugin works great! Thanks!

Do you think it’d be possible to make the backlinks stay in preview mode too?

1 Like

Please open a Github issue I’ll see what I can do.

1 Like

Just to be sure that I’m getting this right: I’ve enabled the plugin and it opens a new pane with the backlinks to the page I’m on. However, it doesn’t add the backlinks to the bottom of the active page - it only shows a static page with backlinks that I can move to the bottom. Is this the correct behavior? From the description it sounds like the backlinks should be embedded in the bottom of each page after they’ve been opened, but I could be misunderstanding.

It has not worked for me since 0.10.0

Previously the backlinks showed embedded in the note window. I’ve reinstalled and checked all the settings with no progress.


I too am confused about the same thing: do the backlinks get appended to the markdown file, or is it just that a panel opens up in the view? i.e., if I open the .md file in a text editor outside Obsidian, will I see the backlinks?

The plugin will integrate a backlinks panel at the bottom of the document. So you’ll need to scroll down to see the backlinks panel.

1 Like

Hi @mark1nhu,

I’ve looking for this solution for months, and today I found it - but I had no success running it.

  • I created a CSS snippet, activate it, but nothing work

  • Then I copy and paste the code in the CSS Theme and again nothing work

Based on that, do you have an idea of what could be happening?
I’m using Windows and the last version of Obsidian - v0.12.3

  • After the CSS snippet and CSS Theme and mentioned, I open a note and expected to see the backlinks on the button. Is it correct, or should I run something?