• This repository has been archived on 15/Jun/2021
  • Stars
    star
    3,521
  • Rank 12,063 (Top 0.3 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 10 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DEPRECATED: A rich text editor framework for the web platform

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

Scribe

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

Status

Build Status Join the chat at https://gitter.im/guardian/scribe

Description

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.

Core

At the core of Scribe we have:

Patches

Scribe patches many browser inconsistencies in the native command API.

Installation

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
  scribe.use(scribePluginBlockquoteCommand());
  var toolbarElement = document.querySelector('.toolbar');
  scribe.use(scribePluginToolbar(toolbarElement));
});

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.

Options

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

For detailed documentation see the wiki page on options.

Architecture

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:

scribe.use(myPlugin);

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) {
  scribe.transactionManager.run(function () {
    // Do some fancy DOM manipulation
  });
}

Browser Support

Moved to the Github Wiki

Plugins

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

FAQ

See the wiki's FAQ

More Repositories

1

frontend

The Guardian DotCom.
Scala
5,740
star
2

grid

The Guardian’s image management system
Scala
1,431
star
3

toolargetool

A tool to help you debug TransactionTooLargeExceptions on Android 7+
Kotlin
932
star
4

coding-exercises

Coding exercises
402
star
5

guardian.github.com

Guardian github pages
HTML
317
star
6

riff-raff

The Guardian's deployment platform
Scala
263
star
7

gu-who

answering: who are all these users in my GitHub org?
Scala
221
star
8

dotcom-rendering

The Guardian web rendering service
TypeScript
212
star
9

typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Scala
207
star
10

swarmize

the data journalism platform
Ruby
155
star
11

elk-stack

ELK Stack ... based on Elastic Stack 5.x
JavaScript
147
star
12

prout

Looks after your pull requests, tells you when they're live
Scala
144
star
13

riemann-config

Configuration for alerting and event processing in Riemann
Clojure
141
star
14

prosemirror-typerighter

The client-side companion to Typerighter. Match ranges with spellchecker-like semantics in Prosemirror documents.
TypeScript
110
star
15

guss

Guss is a collection of Sass bower components, re-usable across multiple Guardian web products
107
star
16

source

Source: a component library for the Guardian's Design System
TypeScript
98
star
17

athena-cli

Presto-like CLI tool for AWS Athena
Python
86
star
18

recommendations

Recommendations for how to develop software at the Guardian
JavaScript
64
star
19

cf-notify

Get notified in Slack when changes to your Cloud Formation stack are made.
Python
59
star
20

iframe-messenger

postMessage interface
JavaScript
57
star
21

vagrants

Vagrant configurations
Ruby
55
star
22

ganglia-api

API layer that exposes ganglia data in a RESTful JSON manner
Python
50
star
23

amigo

AMIgo: An AMI bakery
Scala
49
star
24

prism

Tool for collecting live data about infrastructure so it can be easily queried by users and automated tooling
Scala
48
star
25

prosemirror-noting

Prosemirror plugin that adds the ability to have ranges added to the document that expand and contract around dependent on the input.
JavaScript
48
star
26

html-janitor

Scribe module - DO NOT DELETE
JavaScript
46
star
27

guss-rem

Use rem units in your CSS with a pixel fallback for older browsers
CSS
44
star
28

online-abuse-analysis

Scala
42
star
29

editions

📆🆕 Daily Edition app
TypeScript
42
star
30

kinesis-logback-appender

LOGBack Appender for writing data into a Kinesis Stream
Java
39
star
31

content-api-scala-client

A Scala client library for the Guardian's Content API
Scala
39
star
32

dev-nginx

Tools to configure a local development nginx to proxy our applications and services
Shell
39
star
33

sbt-grunt-plugin

For kicking off grunt tasks from inside sbt
Scala
38
star
34

giant

Platform for journalists to search, analyse, categorise and share unstructured data
Scala
38
star
35

teamcity-s3-plugin

Teamcity plugin for uploading artifacts to S3
Scala
36
star
36

pasteup

This project is now deprecated. Future development on the Guardian's design language can be found in dotcom-rendering
JavaScript
36
star
37

mobile-apps-article-templates

Templates for articles on The Guardian iOS and Android apps
SCSS
34
star
38

machine-images

DEPRECATED: Scripts for building machine images (principally AMIs)
Ruby
34
star
39

membership-frontend

Guardian events and masterclasses
Scala
34
star
40

status-app

Guardian AWS Applications Status App
Scala
33
star
41

play-googleauth

Simple play module for authenticating against Google
Scala
32
star
42

wraith-donk

Wraps wraith in a web server
Ruby
31
star
43

prosemirror-elements

A ProseMirror plugin for adding user-defined 'elements' containing arbitrary fields to a document.
TypeScript
29
star
44

sbt-play-assethash

SBT plugin for Play 2 to add MD5 sums to asset file names
Scala
28
star
45

consent-management-platform

Guardian consent management
CSS
26
star
46

engineering-performance-framework

The Guardian Engineering performance framework
25
star
47

facia-tool

Guardian front pages editor (AKA Fronts tool)
JavaScript
24
star
48

support-frontend

💁‍♀️❤️📰 Frontend for the Supporter platform
Scala
24
star
49

guardian-engineering-site

Code for theguardian.engineering site
TypeScript
23
star
50

mobile-n10n

n10n for nOTIFICATIOn
Scala
23
star
51

sbt-jasmine-plugin

An SBT plugin for running jasmine tests in your build.
JavaScript
23
star
52

guss-webfonts

Guss' Webfonts component
HTML
21
star
53

csnx

Monorepo for Guardian UIs
TypeScript
20
star
54

play-brotli-filter

Brotli filter for the playframework
Scala
19
star
55

react-native-with-kotlin

Placeholder description: @maxspencer created this with repo-genesis
Objective-C
19
star
56

ssm-scala

ssh replacement: CLI program that wraps SSM's EC2 Run Command
Scala
19
star
57

aws-pen-test-form

Tool to generate info for the AWS penetration testing request form
Scala
19
star
58

guss-grid-system

Sass mixins and default values for the Next Gen grid system.
CSS
18
star
59

our-engineering-culture

How we as engineers define our culture
18
star
60

sbt-teamcity-test-reporting-plugin

Sbt plugin that enables TeamCity to report test details
Scala
18
star
61

language-system

The Multi-Language Automatic Translation, Subtitling, and Voice Rendering System uses third party software to automatically convert audio to text, translate text, render text to video, and render text to audio.
PHP
17
star
62

music-api-scala-client

Scala
17
star
63

lambda-elasticsearch

Helper to send elasticsearch request from a lambda
JavaScript
16
star
64

awesome-lambda

A collection of Lambda related implementations, libraries, resources an useful stuff.
15
star
65

cdk

Generic Guardian flavoured AWS CDK components
TypeScript
15
star
66

subscriptions-frontend

Scala
15
star
67

world-map

Rough-and-ready geometry files for quickly rendering an SVG map of the world
15
star
68

techtime

General repository for everything techtime.
Ruby
14
star
69

prosemirror-invisibles

A simple implementation of invisible characters in ProseMirror.
TypeScript
14
star
70

httpie-hmac-auth

HMAC auth plugin for HTTPie
Python
13
star
71

videojs-embed

A plugin for Video.js that adds a control bar button to toggle an embed code overlay.
JavaScript
13
star
72

tagmanager

Tag Manager: "Like a Beautiful Mind, but with tags" - Unknown
JavaScript
13
star
73

coding-exercise-project

Skeletion project structures for various languages
Shell
13
star
74

security-hq

Centralised security information for AWS accounts
Scala
13
star
75

manage-frontend

TypeScript
12
star
76

ts-failure

Promise error handling in typescript.
TypeScript
12
star
77

grunt-asset-monitor

Grunt task to analyse and log simple metrics of static assets to Amazon CloudWatch.
JavaScript
12
star
78

simple-configuration

A configuration library without any magic
Scala
12
star
79

element-radiator

Helper Polymer elements for building information radiators and monitoring dashboards
HTML
12
star
80

elk6

Elasticsearch, Logstash, Kibana stack for version 6
Ruby
11
star
81

play-secret-rotation

Rotate your Application Secret on an active cluster of Play app servers
Scala
11
star
82

janus-app

Google-backed AWS account access
Scala
11
star
83

zapush

drop-in war to submit jmx stats to zabbix
Scala
11
star
84

libs

A collection of JavaScript libraries and TypeScript types for Guardian projects
TypeScript
11
star
85

scribe-angular-example

JavaScript
11
star
86

quiz-builder

NO LONGER USED - Tool for building quiz JSON
JavaScript
11
star
87

fastly-api-client

An asynchronous Scala client for Fastly's API used to deploy and update configs, decache objects and query the stats API
Scala
11
star
88

tip

Scala library for testing in production
Scala
10
star
89

grid-inspector

Web UI to inspect rights of Grid images
JavaScript
10
star
90

support-service-lambdas

Lambdas covering supporter operations, mostly in life operations
Scala
10
star
91

solr-field-update

Basic support for merging documents in Solr.
Java
10
star
92

pan-domain-authentication

Helper to provide a common federated authentication for all services within a domain (AKA Panda)
Scala
10
star
93

fezziwig

Fezziwig is a library for compile time generation of Circe encoders/decoders for Scrooge-generated classes representing Thrift objects.
Scala
10
star
94

flags

Collection of SVG flags indexed by world bank code (e.g. GBR.svg = Union Jack), plus scripts to get bitmap thumbnails
JavaScript
10
star
95

raspberry-pi-dashboards

How to setup Raspberry Pi dashboards in the Guardian Digital department
Shell
10
star
96

scribe-plugin-noting

JavaScript
9
star
97

content-api-haskell-client

A simple Haskell client library for the Guardian's Content API
Haskell
9
star
98

dupin

Search Git repositories for secrets
Python
9
star
99

guss-layout

Low-level responsive layout patterns
CSS
9
star
100

csrf-example

Practice exploiting Cross-Site Request Forgery vulnerabilities
JavaScript
9
star