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

Commit

Permalink
Fix various grammatical errors (#2158)
Browse files Browse the repository at this point in the history
Summary:
Improve documentation readability by inserting/removing punctuation as appropriate.
Pull Request resolved: #2158

Differential Revision: D16785872

Pulled By: niveditc

fbshipit-source-id: 6e1208b1d6536a57be32f2fc7b91b291de3001f0
  • Loading branch information
jkhaui authored and facebook-github-bot committed Aug 13, 2019
1 parent ce8bdd0 commit 1ff8c8c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/Advanced-Topics-Custom-Block-Render.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ This article discusses how to customize Draft default block rendering.
The block rendering is used to define supported block types and their respective
renderers, as well as converting pasted content to known Draft block types.

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

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

## Configuring block render map

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

Expand Down Expand Up @@ -65,8 +65,8 @@ class RichEditor extends React.Component {
}
```

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

*example of extending default block render map:*

Expand Down Expand Up @@ -95,7 +95,7 @@ class RichEditor extends React.Component {

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

*example of unstyled block type alias usage:*

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

## Custom block wrappers

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

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

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

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

Expand Down

0 comments on commit 1ff8c8c

Please sign in to comment.