{"id":13472954,"url":"https://github.com/guardian/scribe","last_synced_at":"2025-09-28T19:31:21.879Z","repository":{"id":11764078,"uuid":"14298729","full_name":"guardian/scribe","owner":"guardian","description":"DEPRECATED: A rich text editor framework for the web platform","archived":true,"fork":false,"pushed_at":"2020-03-08T04:04:14.000Z","size":5633,"stargazers_count":3501,"open_issues_count":107,"forks_count":245,"subscribers_count":154,"default_branch":"master","last_synced_at":"2025-01-09T21:29:42.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://guardian.github.io/scribe/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guardian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-11T11:13:38.000Z","updated_at":"2025-01-09T01:08:52.000Z","dependencies_parsed_at":"2022-08-31T00:31:16.993Z","dependency_job_id":null,"html_url":"https://github.com/guardian/scribe","commit_stats":null,"previous_names":[],"tags_count":99,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fscribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fscribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fscribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guardian%2Fscribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guardian","download_url":"https://codeload.github.com/guardian/scribe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234429248,"owners_count":18831241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:00:59.506Z","updated_at":"2025-09-28T19:31:16.589Z","avatar_url":"https://github.com/guardian.png","language":"JavaScript","readme":"**THIS PROJECT IS DEPRECATED** - You can find more information about this in our blog post, [Leaving Scribe](https://www.theguardian.com/info/2019/jan/24/leaving-scribe). In summary:\n\n- 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\n- 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\n- In time we hope to be able to open source the new text editor we are working on\n\n# Scribe\n\nA rich text editor framework for the web platform, with patches for\nbrowser inconsistencies and sensible defaults.\n\n## Status\n\n [![Build Status](https://travis-ci.org/guardian/scribe.svg?branch=master)](https://travis-ci.org/guardian/scribe) \u003ca href=\"https://david-dm.org/guardian/scribe\"\u003e\u003cimg src=\"https://david-dm.org/guardian/scribe.svg\"\u003e\u003c/a\u003e [![Join the chat at https://gitter.im/guardian/scribe](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/guardian/scribe?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n## Description\n\nFor an introduction, you may want to read the blog post [Inside the Guardian’s CMS: meet Scribe, an extensible rich text editor](http://www.theguardian.com/info/developer-blog/2014/mar/20/inside-the-guardians-cms-meet-scribe-an-extensible-rich-text-editor).\n\n**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.\n\nYou can join us on IRC at [#scribejs] on freenode, or via the [Google Group](https://groups.google.com/forum/#!forum/scribe-editor).\n\n[See an example][example].\n\nScribe only actively supports a [sub-set of browsers](https://github.com/guardian/scribe/wiki/Browser-support).\n\n## Core\n\nAt the core of Scribe we have:\n\n* [Patches for many browser inconsistencies surrounding `contenteditable`](#patches);\n* [Inline and block element modes](https://github.com/guardian/scribe/wiki/Modes#).\n\n### Patches\n\nScribe patches [many browser inconsistencies][browser inconsistencies] in the [native command API][Executing Commands].\n\n## Installation\n```\nbower install scribe\n```\n\nAlternatively, you can [access the distribution files through GitHub releases](https://github.com/guardian/scribe/releases).\n\n## Usage Example\n\nScribe is an AMD module:\n\n``` js\nrequire(['scribe', 'scribe-plugin-blockquote-command', 'scribe-plugin-toolbar'],\n  function (Scribe, scribePluginBlockquoteCommand, scribePluginToolbar) {\n  var scribeElement = document.querySelector('.scribe');\n  // Create an instance of Scribe\n  var scribe = new Scribe(scribeElement);\n\n  // Use some plugins\n  scribe.use(scribePluginBlockquoteCommand());\n  var toolbarElement = document.querySelector('.toolbar');\n  scribe.use(scribePluginToolbar(toolbarElement));\n});\n```\n\nYou can [see a live example here][example], or [view the code here](https://github.com/guardian/scribe).\n\nAlso be sure to check the [`examples`](./examples) directory for an\nAMD syntax example as well as a CommonJS (browserify) example.\n\n## Options\n\n\u003cdl\u003e\n  \u003cdt\u003e\u003cpre\u003eallowBlockElements\u003c/pre\u003e\u003c/dt\u003e\n  \u003cdd\u003eEnable/disable block element \u003ca href=\"https://github.com/guardian/scribe/wiki/Modes\"\u003emode\u003c/a\u003e (enabled by default)\u003c/dd\u003e\n  \u003cdt\u003e\u003cpre\u003eundo: { enabled: false }\u003c/pre\u003e\u003c/dt\u003e\n  \u003cdd\u003eEnable/disable Scribe's custom undo manager\u003c/dd\u003e\n  \u003cdt\u003e\u003cpre\u003edefaultCommandPatches\u003c/pre\u003e\u003c/dt\u003e\n  \u003cdd\u003eDefines which command patches should be loaded by default\u003c/dd\u003e\n  \u003cdt\u003e\u003cpre\u003edefaultPlugins\u003c/pre\u003e\u003c/dt\u003e\n  \u003cdd\u003eDefines which of Scribe's built-in plugins should be active\u003c/dd\u003e\n  \u003cdt\u003e\u003cpre\u003edefaultFormatters\u003c/pre\u003e\u003c/dt\u003e\n  \u003cdd\u003eDefines which of Scribe's default formatters should be active\u003c/dd\u003e\n\u003c/dl\u003e\n\nFor detailed documentation see the [wiki page on options](https://github.com/guardian/scribe/wiki/Scribe-configuration-options).\n\n## Architecture\n\n* [Everything is a plugin](https://github.com/guardian/scribe/tree/master/src/plugins).\n* No runtime dependencies.\n\nA plugin is simply a function that receives Scribe as an argument:\n\n``` js\nfunction myPlugin(scribe) {}\n```\n\nA consumer can then use your plugin with `Scribe.use`:\n\n``` js\nscribe.use(myPlugin);\n```\n\nPlugins may package whatever functionality you desire, and you are free to use\nnative APIs to do so. However, you are required to wrap any DOM manipulation in\na transaction, so that we can capture state changes for the history. For\nexample:\n\n``` js\nfunction myPlugin(scribe) {\n  scribe.transactionManager.run(function () {\n    // Do some fancy DOM manipulation\n  });\n}\n```\n\n### Browser Support\n\n[Moved to the Github Wiki](https://github.com/guardian/scribe/wiki/Browser-support)\n\n## Plugins\n\nScribe has a rich plugin ecosystem that expands and customises what it can do.\n\nSee the wiki for a [list of plugins and how to create new ones](https://github.com/guardian/scribe/wiki/Plugins)\n\n## FAQ\n\nSee the wiki's [FAQ](https://github.com/guardian/scribe/wiki/FAQ)\n\n[browser inconsistencies]: https://github.com/guardian/scribe/blob/master/BROWSERINCONSISTENCIES.md\n[Executing Commands]: https://developer.mozilla.org/en-US/docs/Rich-Text_Editing_in_Mozilla#Executing_Commands\n[Range API]: https://developer.mozilla.org/en-US/docs/Web/API/Range\n[Selection API]: https://developer.mozilla.org/en-US/docs/Web/API/Selection\n[example]: http://guardian.github.io/scribe\n","funding_links":[],"categories":["JavaScript","独立的","others","etc","Rich-text editors using contenteditable","Standalone"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguardian%2Fscribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguardian%2Fscribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguardian%2Fscribe/lists"}