Notefix Docs See the demo site

Install options

Everything the tag can be told, and what to do on sites that need a little more: strict security policies, single page apps, and pages that scroll inside a box.

The tag#

html
<script src="/notefix/notefix-embed.js"
        data-project="Acme staging"
        data-api="/notefix-api"
        data-board="staging"
        data-issues="queue"></script>
AttributeWhat it doesIf you leave it out
data-projectThe name shown in NotefixThe page title
data-apiWhere the store is. A path on your site, not a full addressNotes stay in each person's browser
data-boardWhich board this page's notes go onA board named after the page's path
data-issuesqueue turns on Create an issue for a connected tracker. Needs data-apiCreate an issue says nothing is connected
data-themelight or darkDark
data-railpinned starts with the toolbar on screen instead of tucked at the edgeTucked at the edge
data-mobile-breakpointBelow this width, in pixels, Notefix lays itself out for a phone: toolbar along the bottom, All notes as a sheet560
data-phoneoff hides Notefix on phones altogether, instead of laying it out for oneOn

Where to put it#

Just before </body>, on the pages you want reviewed. Put it on your staging site, not production: since it is one line, it is only ever where you added it.

If your pages share a layout template, add it there behind a condition:

html
{% if environment == "staging" %}
  <script src="/notefix/notefix-embed.js" data-api="/notefix-api" data-board="staging"></script>
{% endif %}

Content Security Policy#

This is the most common reason nothing appears. If your site sends a Content-Security-Policy header, it may block Notefix's files. The browser console says so.

The recommended install already works with the strictest usual policy, without changing it:

Your policy saysWhy it still works
script-src 'self'The files are copied onto your own site
style-src 'self'The stylesheets are too
connect-src 'self'The store is a path on your own site, through your proxy

So: copy the folder rather than linking to it from somewhere else, and proxy the store rather than pointing at its port.

Single page apps#

React, Vue, Angular and the like work as they are, as long as the address changes when the screen does. Notefix files each note under the page's path.

If your app does not change the address, or you would rather notes were filed under your own screen names, tell Notefix how to name the current screen. Put this before the tag:

html
<script>
  window.NotefixConfig = {
    screen: function () { return myRouter.currentRouteName(); }
  };
</script>
<script src="/notefix/notefix-embed.js" data-api="/notefix-api"></script>

Apps that scroll inside a box#

Notefix finds the part of the page that scrolls by itself. If notes stay still while your content scrolls under them, point it at the right element:

js
window.NotefixConfig = {
  scroller: function () { return document.querySelector('.app-scroll'); }
};

Help notes find their element#

A note remembers several ways to find its element again. The most reliable is a stable attribute: every data-testid in your app keeps notes attached even through a redesign. Without those, an id on important elements is nearly as good.

Removing it#

Delete the tag. Notefix never changes your page: it draws on top and reads where things are, so the page works exactly the same without it. Notes already written stay in the store until you delete its database.

What it does to your site#

Check which version is running by typing window.NotefixVersion in the browser console.