JavaScript plugins for Roam Research [[roam/js]]

One of the reasons why advanced users enjoy Roam Research so much is metaprogramming—the ability to modify Roam’s behaviour inside Roam itself, without ever touching its source code. By using JavaScript blocks via the roam/js feature, you can add new customise your experience.

The good news is: you don’t need to be a programmer yourself to enjoy some of the added benefits these little bits of extra code have to offer. Fellow Roam users have generously made many such improvements public. Akin to plugins, you can install these JavaScript “mods” in a few clicks.

To use any of these, create a page called roam/js. Every time you want to install a new JavaScript plugin, create a parent block with the following: {{[[roam/js]]}} – this will add an important warning so you are reminded to be careful with any code (especially third-party code) you add to your Roam database.

Roam Research: roam/js JavaScript plugins warning

Nested under the warning, add the JavaScript code for the plugin you wish to add. After reading the warning, click on “Yes, I know what I am doing”. Whenever you want to stop using a JavaScript plugin, click on “Stop this” in the corresponding parent block.

Roam Research roam/js warning activated - Stop this button

Okay, now, let’s have a look at some of the most interesting plugins out there.

Roam42

Live preview, jump to date, quick reference, and many useful shortcut keys such as opening the sidebar or moving to the top or bottom of a page—Roam42 adds many quality of life improvements to Roam.

INSTALL ROAM42

RoamJS

Ready for some more advanced features? RoamJS got it all: import the list of events on a given day from Google Calendar into your daily notes page; extract the text from an image and output it into Roam; define page synonyms for easier referencing; easily insert emojis; render charts; automatically import tweets related to a specific Roam page… And the list goes on.

RoamJS JavaScript plugins installation via widget

RoamJS is a treasure trove of JavaScript plugins to install in Roam. It’s easy to get lost, but fear not: you can use the handy widget to generate the code for all the plugins you want to install in a couple of clicks.

INSTALL ROAMJS

Other plugins

With so many plugins out there, you are sure to find what you need. Here are a few more to try out.

There are more JavaScript plugins for Roam being created every week. If you’re looking up more of them, be aware that they are sometimes called “extensions” or “addons”—I personally prefer to keep these terms for browser extensions, but there’s no official name (yet?) for the roam/js snippets users add to customise their experience.

As with everything, don’t overdo it: only install what’s useful to improve your personal workflow, and make sure you trust the developer. The roam/js feature is powerful, and you know what they say about great power. It can sometimes be prudent to try a plugin on a test database before installing it on your main database. Have fun!

P.S. Interested in creating your own JavaScript plugins for Roam? This is a great tutorial.
P.P.S. Want to learn how to make the most of Roam? Join Roam Essentials, a short course to master 20% of the features that will unlock 80% of Roam’s power.


Join 80,000 mindful makers!

Maker Mind is a weekly newsletter with science-based insights on creativity, mindful productivity, better thinking and lifelong learning.

One email a week, no spam, ever. See our Privacy policy.