diff --git a/Readme.md b/Readme.md index ae0c3b70e..fa5067d09 100644 --- a/Readme.md +++ b/Readme.md @@ -9,12 +9,12 @@

- Why? · - Principles · - Demo · - Examples · - Plugins · - Documentation · + Why? · + Principles · + Demo · + Examples · + Plugins · + Documentation · Contributing!


@@ -26,7 +26,7 @@

- + @@ -35,19 +35,19 @@ - + - + - + - + - +


@@ -127,7 +127,7 @@ To get a sense for how you might use Slate, check out a few of the examples: * [**Hovering menu**](./examples/hovering-menu) — showing how a contextual hovering menu can be implemented. * [**Tables**](./examples/tables) — showing how to nest blocks to render more advanced components. * [**Paste HTML**](./examples/paste-html) — showing how to use an HTML serializer to handle pasted HTML. -* [**Code Highlighting**](./examples/code-highlighting) — showing how to use decorators to dynamically mark text. +* [**Code Highlighting**](./examples/code-highlighting) — showing how to use decorations to dynamically mark text. * [**See all the examples...**](./examples) If you have an idea for an example that shows a common use case, pull request it! diff --git a/docs/Introduction.md b/docs/Introduction.md index 8f8b35f96..3a8fc2621 100644 --- a/docs/Introduction.md +++ b/docs/Introduction.md @@ -70,7 +70,7 @@ To get a sense for how you might use Slate, check out a few of the examples: * [**Hovering menu**](https://github.com/ianstormtaylor/slate/tree/master/examples/hovering-menu) — showing how a contextual hovering menu can be implemented. * [**Tables**](https://github.com/ianstormtaylor/slate/tree/master/examples/tables) — showing how to nest blocks to render more advanced components. * [**Paste HTML**](https://github.com/ianstormtaylor/slate/tree/master/examples/paste-html) — showing how to use an HTML serializer to handle pasted HTML. -* [**Code Highlighting**](https://github.com/ianstormtaylor/slate/tree/master/examples/code-highlighting) — showing how to use decorators to dynamically mark text. +* [**Code Highlighting**](https://github.com/ianstormtaylor/slate/tree/master/examples/code-highlighting) — showing how to use decorations to dynamically mark text. If you have an idea for an example that shows a common use case, pull request it! diff --git a/examples/Readme.md b/examples/Readme.md index 9e7b41b25..6f9e8fe36 100644 --- a/examples/Readme.md +++ b/examples/Readme.md @@ -13,7 +13,7 @@ This directory contains a set of examples that give you an idea for how you migh * [**Hovering menu**](./hovering-menu) — showing how a contextual hovering menu can be implemented. * [**Tables**](./tables) — showing how to nest blocks to render more advanced components. * [**Paste HTML**](./paste-html) — showing how to use an HTML serializer to handle pasted HTML. -* [**Code Highlighting**](./code-highlighting) — showing how to use decorators to dynamically mark text. +* [**Code Highlighting**](./code-highlighting) — showing how to use decorations to dynamically mark text. * ...and more! If you have an idea for an example that shows a common use case, pull request it! diff --git a/examples/markdown-preview/index.js b/examples/markdown-preview/index.js index dc314f233..33c802457 100644 --- a/examples/markdown-preview/index.js +++ b/examples/markdown-preview/index.js @@ -26,7 +26,7 @@ class MarkdownPreview extends React.Component { state = { value: Plain.deserialize( - 'Slate is flexible enough to add **decorators** that can format text based on its content. For example, this editor has **Markdown** preview decorators on it, to make it _dead_ simple to make an editor with built-in Markdown previewing.\n## Try it out!\nTry it out for yourself!' + 'Slate is flexible enough to add **decorations** that can format text based on its content. For example, this editor has **Markdown** preview decorations on it, to make it _dead_ simple to make an editor with built-in Markdown previewing.\n## Try it out!\nTry it out for yourself!' ), } diff --git a/packages/slate-hyperscript/src/index.js b/packages/slate-hyperscript/src/index.js index 882be7bda..8ac842ff4 100644 --- a/packages/slate-hyperscript/src/index.js +++ b/packages/slate-hyperscript/src/index.js @@ -445,7 +445,7 @@ function createChildren(children, options = {}) { */ function resolveCreators(options) { - const { blocks = {}, inlines = {}, marks = {}, decorators = {} } = options + const { blocks = {}, inlines = {}, marks = {}, decorations = {} } = options const creators = { ...CREATORS, @@ -464,8 +464,8 @@ function resolveCreators(options) { creators[key] = normalizeMark(key, marks[key]) }) - Object.keys(decorators).map(key => { - creators[key] = normalizeNode(key, decorators[key], 'decoration') + Object.keys(decorations).map(key => { + creators[key] = normalizeNode(key, decorations[key], 'decoration') }) return creators diff --git a/packages/slate-hyperscript/test/decorations/across-blocks.js b/packages/slate-hyperscript/test/decorations/across-blocks.js index 17a633486..6263bc591 100644 --- a/packages/slate-hyperscript/test/decorations/across-blocks.js +++ b/packages/slate-hyperscript/test/decorations/across-blocks.js @@ -6,7 +6,7 @@ const h = createHyperscript({ blocks: { paragraph: 'paragraph', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate-hyperscript/test/decorations/across-marks.js b/packages/slate-hyperscript/test/decorations/across-marks.js index 9c9bbb818..3927cfa7f 100644 --- a/packages/slate-hyperscript/test/decorations/across-marks.js +++ b/packages/slate-hyperscript/test/decorations/across-marks.js @@ -9,7 +9,7 @@ const h = createHyperscript({ marks: { b: 'bold', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate-hyperscript/test/decorations/deep-anchors.js b/packages/slate-hyperscript/test/decorations/deep-anchors.js index 4a3508548..68e4a9a8a 100644 --- a/packages/slate-hyperscript/test/decorations/deep-anchors.js +++ b/packages/slate-hyperscript/test/decorations/deep-anchors.js @@ -7,7 +7,7 @@ const h = createHyperscript({ ul: 'ul', li: 'li', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate-hyperscript/test/decorations/intersecting-marks.js b/packages/slate-hyperscript/test/decorations/intersecting-marks.js index d231eca80..abab2f306 100644 --- a/packages/slate-hyperscript/test/decorations/intersecting-marks.js +++ b/packages/slate-hyperscript/test/decorations/intersecting-marks.js @@ -9,7 +9,7 @@ const h = createHyperscript({ marks: { b: 'bold', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate-hyperscript/test/decorations/multiple.js b/packages/slate-hyperscript/test/decorations/multiple.js index e8b0c44d2..0d014299f 100644 --- a/packages/slate-hyperscript/test/decorations/multiple.js +++ b/packages/slate-hyperscript/test/decorations/multiple.js @@ -6,7 +6,7 @@ const h = createHyperscript({ blocks: { paragraph: 'paragraph', }, - decorators: { + decorations: { highlight: 'highlight', lowlight: 'lowlight', }, diff --git a/packages/slate-hyperscript/test/decorations/nested.js b/packages/slate-hyperscript/test/decorations/nested.js index 223a7a562..30fe9e188 100644 --- a/packages/slate-hyperscript/test/decorations/nested.js +++ b/packages/slate-hyperscript/test/decorations/nested.js @@ -6,7 +6,7 @@ const h = createHyperscript({ blocks: { paragraph: 'paragraph', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate-hyperscript/test/decorations/overlapping.js b/packages/slate-hyperscript/test/decorations/overlapping.js index f7e8ce98f..943a71e61 100644 --- a/packages/slate-hyperscript/test/decorations/overlapping.js +++ b/packages/slate-hyperscript/test/decorations/overlapping.js @@ -6,7 +6,7 @@ const h = createHyperscript({ blocks: { paragraph: 'paragraph', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate-hyperscript/test/fixtures/decoration-across-blocks.js b/packages/slate-hyperscript/test/fixtures/decoration-across-blocks.js index dd0008dbb..01f64e160 100644 --- a/packages/slate-hyperscript/test/fixtures/decoration-across-blocks.js +++ b/packages/slate-hyperscript/test/fixtures/decoration-across-blocks.js @@ -6,7 +6,7 @@ const h = createHyperscript({ blocks: { paragraph: 'paragraph', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate-hyperscript/test/fixtures/decoration.js b/packages/slate-hyperscript/test/fixtures/decoration.js index 77923ea36..a92ad081c 100644 --- a/packages/slate-hyperscript/test/fixtures/decoration.js +++ b/packages/slate-hyperscript/test/fixtures/decoration.js @@ -6,7 +6,7 @@ const h = createHyperscript({ blocks: { paragraph: 'paragraph', }, - decorators: { + decorations: { highlight: 'highlight', }, }) diff --git a/packages/slate/test/helpers/h.js b/packages/slate/test/helpers/h.js index 0c38fec09..0445ef7de 100644 --- a/packages/slate/test/helpers/h.js +++ b/packages/slate/test/helpers/h.js @@ -28,7 +28,7 @@ const h = createHyperscript({ u: 'underline', fontSize: 'font-size', }, - decorators: { + decorations: { highlight: 'highlight', }, })