Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 1ff8c8c

Browse files
jkhauifacebook-github-bot
authored andcommitted
Fix various grammatical errors (#2158)
Summary: Improve documentation readability by inserting/removing punctuation as appropriate. Pull Request resolved: #2158 Differential Revision: D16785872 Pulled By: niveditc fbshipit-source-id: 6e1208b1d6536a57be32f2fc7b91b291de3001f0
1 parent ce8bdd0 commit 1ff8c8c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/Advanced-Topics-Custom-Block-Render.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ This article discusses how to customize Draft default block rendering.
77
The block rendering is used to define supported block types and their respective
88
renderers, as well as converting pasted content to known Draft block types.
99

10-
When pasting content or when using the
11-
[convertFromHTML](/docs/api-reference-data-conversion.html#convertfromhtml)
12-
Draft will then convert the pasted content to the respective block rendering type
10+
When pasting content, or when calling
11+
[convertFromHTML](/docs/api-reference-data-conversion.html#convertfromhtml),
12+
Draft will convert pasted content to the respective block rendering type
1313
by matching the Draft block render map with the matched tag.
1414

1515
## Draft default block render map
@@ -34,7 +34,7 @@ by matching the Draft block render map with the matched tag.
3434

3535
## Configuring block render map
3636

37-
Draft default block render map can be overwritten, by passing an
37+
Draft's default block render map can be overwritten by passing an
3838
[Immutable Map](http://facebook.github.io/immutable-js/docs/#/Map) to
3939
the editor blockRender props.
4040

@@ -65,8 +65,8 @@ class RichEditor extends React.Component {
6565
}
6666
```
6767

68-
There are cases where instead of overwriting the defaults we just want to add new block types;
69-
this can be done by using the DefaultDraftBlockRenderMap reference to create a new blockRenderMap
68+
There are cases where instead of overwriting the defaults, we just want to add new block types.
69+
This can be done by using the DefaultDraftBlockRenderMap reference to create a new blockRenderMap
7070

7171
*example of extending default block render map:*
7272

@@ -95,7 +95,7 @@ class RichEditor extends React.Component {
9595

9696
When Draft parses pasted HTML, it maps from HTML elements back into
9797
Draft block types. If you want to specify other HTML elements that map to a
98-
particular block type, you can add an array `aliasedElements` to the block config.
98+
particular block type, you can add the array `aliasedElements` to the block config.
9999

100100
*example of unstyled block type alias usage:*
101101

@@ -108,16 +108,16 @@ particular block type, you can add an array `aliasedElements` to the block confi
108108

109109
## Custom block wrappers
110110

111-
By default the html element is used to wrap block types however a react component
111+
By default, the html element is used to wrap block types. However, a react component
112112
can also be provided to the _blockRenderMap_ to wrap the EditorBlock.
113113

114-
During pasting or when using the
115-
[convertFromHTML](/docs/api-reference-data-conversion.html#convertfromhtml)
114+
During pasting, or when calling
115+
[convertFromHTML](/docs/api-reference-data-conversion.html#convertfromhtml),
116116
the html will be scanned for matching tag elements. A wrapper will be used when there is a definition for
117117
it on the _blockRenderMap_ to wrap that particular block type. For example:
118118

119-
Draft uses wrappers to wrap `<li/>` inside either `<ol/>` or `<ul/>` but wrappers can also be used
120-
to wrap any other custom block type
119+
Draft uses wrappers to wrap `<li/>` inside either `<ol/>` or `<ul/>`, but wrappers can also be used
120+
to wrap any other custom block type.
121121

122122
*example of extending default block render map to use a react component for a custom block:*
123123

0 commit comments

Comments
 (0)