Skip to content
DEPRECATED: A rich text editor framework for the web platform
JavaScript Shell HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Fixes #489; Delete range contents when pressing enter in inline-mode;… Jul 22, 2016
src Merge pull request #522 from guardian/rahb/fix-scribe-commands Aug 10, 2018
test-old Breaks out the unit tests from the previous test suite and adds a Gul… Feb 28, 2016
test Fixes #489; Delete range contents when pressing enter in inline-mode;… Jul 22, 2016
.editorconfig Add EditorConfig Nov 13, 2013
.gitignore Creates a working Mocha test runner Mar 6, 2016
.jshintrc Add eqeqeq JSHint option Nov 13, 2013
.nvmrc Removes lodash as a dependency. Updates to Node 5. Merges in master Apr 26, 2016
.tern-project term-project: update "lodash-amd" require path May 21, 2014
.travis.yml Build: Travis: update the Node 5 build Jun 14, 2016 Added line about unexpected error with commandQueryState in Firefox w… Jun 26, 2015 v3.3.0 Mar 3, 2017 Updates Contributing to explain how to start contributing to Scribe Mar 20, 2015
Gruntfile.js Fixes the Gruntfile to build both distributable files to the build di… Mar 16, 2016
LICENSE fix license Nov 30, 2017
PLUGINS Add file with plugin ideas/requests Nov 27, 2013
Plumbing.js Changes the require path alias for immutable Jun 18, 2015 Add deprecation information Jan 30, 2019
bower.json Immutable: update dependency Apr 29, 2016 Updates the decision file with some reasoning about the scale of this… Apr 27, 2016
package.json v3.3.0 Mar 3, 2017 Starts using NPM script to abstract the actual build tool and switche… Mar 13, 2016 Accept args for test specs to run Jun 26, 2015 Update Apr 5, 2015 replace circle config with teamCity build script Sep 5, 2018

THIS PROJECT IS DEPRECATED - You can find more information about this in our blog post, Leaving Scribe. In summary:

  • We have no plans to add features to Scribe but may make critical updates throughout the period that we continue to use instances of Scribe internally
  • We recommend forking the project in order to do any feature work as we will not be moving the Scribe repository out of the Guardian organisation
  • In time we hope to be able to open source the new text editor we are working on


A rich text editor framework for the web platform, with patches for browser inconsistencies and sensible defaults.


Build Status Join the chat at


For an introduction, you may want to read the blog post Inside the Guardian’s CMS: meet Scribe, an extensible rich text editor.

Please note: There is a lot of missing documentation for Scribe and many of its plugins. We plan to improve this, however in the meantime we encourage you to look at the code. Scribe is very small in comparison to other libraries of its kind.

You can join us on IRC at [#scribejs] on freenode, or via the Google Group.

See an example.

Scribe only actively supports a sub-set of browsers.


At the core of Scribe we have:


Scribe patches many browser inconsistencies in the native command API.


bower install scribe

Alternatively, you can access the distribution files through GitHub releases.

Usage Example

Scribe is an AMD module:

require(['scribe', 'scribe-plugin-blockquote-command', 'scribe-plugin-toolbar'],
  function (Scribe, scribePluginBlockquoteCommand, scribePluginToolbar) {
  var scribeElement = document.querySelector('.scribe');
  // Create an instance of Scribe
  var scribe = new Scribe(scribeElement);

  // Use some plugins
  var toolbarElement = document.querySelector('.toolbar');

You can see a live example here, or view the code here.

Also be sure to check the examples directory for an AMD syntax example as well as a CommonJS (browserify) example.


Enable/disable block element mode (enabled by default)
undo: { enabled: false }
Enable/disable Scribe's custom undo manager
Defines which command patches should be loaded by default
Defines which of Scribe's built-in plugins should be active
Defines which of Scribe's default formatters should be active

For detailed documentation see the wiki page on options.


A plugin is simply a function that receives Scribe as an argument:

function myPlugin(scribe) {}

A consumer can then use your plugin with Scribe.use:


Plugins may package whatever functionality you desire, and you are free to use native APIs to do so. However, you are required to wrap any DOM manipulation in a transaction, so that we can capture state changes for the history. For example:

function myPlugin(scribe) { () {
    // Do some fancy DOM manipulation

Browser Support

Moved to the Github Wiki


Scribe has a rich plugin ecosystem that expands and customises what it can do.

See the wiki for a list of plugins and how to create new ones


See the wiki's FAQ

You can’t perform that action at this time.