# blackhighlighter

> Client and server for widget implementing secure and committed web redaction

Latest version **0.10.1** (published 2023-05-16) · AGPL license · 0 weekly downloads

## Install

```sh
npm install blackhighlighter
pnpm add blackhighlighter
yarn add blackhighlighter
bun add blackhighlighter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.1 |
| Published | 2023-05-16 |
| First published | 2014-07-11 |
| Weekly downloads | 0 |
| License | AGPL |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.10.x |
| Dependencies | 6 |
| Unpacked size | 184.5 KB |
| Known vulnerabilities | 0 (+6 in 4 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Brian Dickens |
| Maintainers | hostilefork |
| Keywords | server, cryptography, redaction, transparency, accountability |

## Links

- npm: https://www.npmjs.com/package/blackhighlighter
- Repository: https://github.com/hostilefork/blackhighlighter
- Homepage: https://github.com/hostilefork/blackhighlighter#readme
- Issues: https://github.com/hostilefork/blackhighlighter/issues
- npm.io page: https://npm.io/package/blackhighlighter

## Dependencies (6)

- [q](https://npm.io/package/q.md) 1.4.1
- [express](https://npm.io/package/express.md) >=3.0.0
- [mongodb](https://npm.io/package/mongodb.md) 5.5.0
- [requirejs](https://npm.io/package/requirejs.md) 2.2.0
- [underscore](https://npm.io/package/underscore.md) 1.8.3
- [body-parser](https://npm.io/package/body-parser.md) 1.15.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.10.1 (latest) — 2023-05-16
- 0.10.0 — 2023-05-13
- 0.9.11 — 2016-04-27
- 0.9.10 — 2016-04-27
- 0.9.9-3 — 2014-10-24
- 0.9.9-2 — 2014-07-21
- 0.9.9-1 — 2014-07-11
- 0.9.9 — 2014-07-11

## README

![Blackhighlighter logo](https://raw.github.com/hostilefork/blackhighlighter/master/blackhighlighter-logo.png)

Blackhighlighter combines novel editing with in-browser cryptography to facilitate new ways of communicating.  It is packaged as a jQuery widget *(with no other dependencies)*, along with a server library that can be integrated into Node.JS projects as an [npm module](https://www.npmjs.org/package/blackhighlighter).

The best way to understand the idea is to see a running demo of a site that incorporates it.  So please visit:

http://blackhighlighter.org

For philosophy, videos, and more articles about the project, see [http://blackhighlighter.hostilefork.com/](http://blackhighlighter.hostilefork.com).


# THIS PACKAGE

This package contains two key source files:

* `blackhighlighter.js` - The server side logic for committing, retreiving, and revealing blackhighlighter commits.  Commits are stored in a MongoDB database.

* `jquery-blackhighlighter/jquery-blackhighlighter.js` - Code implementing the jQuery widget, as well as shared code loaded as a dependency by blackhighlighter.js.  In order to avoid an *actual* dependency on jQuery in the Node code, a "fake" stub is loaded server-side (jquery-fake.js).

The 1.0 goal is to release a functional letter-writing service built on the blackhighlighter package.  That is currently the demo service at blackhighlighter.org; which has a GitHub repository here:

https://github.com/hostilefork/blackhighlighter.org


# USAGE

To include and configure blackhighlighter on the server side, you will need a [MongoDB database URI](http://api.mongodb.org/java/current/com/mongodb/MongoURI.html) where commits and reveals will be read/written:

    var blackhighlighter = require('blackhighlighter');

    blackhighlighter.configure({
        mongoConnectURI: "http://..."
    });

You can serve the `jquery-blackhighlighter.js` and `jquery-blackhighlighter.css` files from directly inside of `./node_modules/blackhighlighter`.  The path to those files is given with `blackhighlighter.pathForJqueryBlackhighlighter()`.  So for instance:

    app.use("/public/js/jquery-blackhighlighter",
        express.static(blackhighlighter.pathForJqueryBlackhighlighter())
    );

For the moment, there are expectations on the URL suffixes of the REST services hardcoded in the widget (relative to a `base_url` you pass it).  See this issue for discussion:

https://github.com/hostilefork/blackhighlighter/issues/57

Thus the way to try using blackhighlighter in your project is essentially "do what the demo does".  A good first start would be to get the demo working and understand it.

Going forward past 1.0, the API is adapting so that the widget can integrate more easily into other applications with a different workflow from blackhighlighter.org.  Feedback is  welcome.

---
_Source: https://npm.io/package/blackhighlighter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
