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

[Docs] Fix return types in Data Conversion doc #336

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/APIReference-Data-Conversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ objects.
### convertFromRaw

```
convertFromRaw(rawState: RawDraftContentState): Array<ContentBlock>
convertFromRaw(rawState: RawDraftContentState): ContentState
```

Given a raw state, convert it to an array of `ContentBlock` objects. This is useful when
Given a raw state, convert it to a `ContentState`. This is useful when
restoring contents to use within a Draft editor.

### convertToRaw
Expand All @@ -49,7 +49,7 @@ other usage within an application.
### convertFromHTML

```
convertFromHTML(html: string): Array<ContentBlock>
convertFromHTML(html: string): ?Array<ContentBlock>
```

Given an HTML fragment, convert it to an array of `ContentBlock` objects.
Given an HTML fragment, convert it to an array of `ContentBlock` objects.
28 changes: 26 additions & 2 deletions website/core/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ module.exports = {
"next": "advanced-topics-issues-and-pitfalls",
"permalink": "docs/advanced-topics-text-direction.html"
},
{
"id": "api-reference-atomic-block-utils",
"title": "AtomicBlockUtils",
"layout": "docs",
"category": "API Reference",
"next": "api-reference-key-binding-util",
"permalink": "docs/api-reference-atomic-block-utils.html"
},
{
"id": "api-reference-character-metadata",
"title": "CharacterMetadata",
Expand All @@ -92,6 +100,14 @@ module.exports = {
"next": "api-reference-entity",
"permalink": "docs/api-reference-character-metadata.html"
},
{
"id": "api-reference-composite-decorator",
"title": "CompositeDecorator",
"layout": "docs",
"category": "API Reference",
"next": "api-reference-data-conversion",
"permalink": "docs/api-reference-composite-decorator.html"
},
{
"id": "api-reference-content-block",
"title": "ContentBlock",
Expand Down Expand Up @@ -148,6 +164,14 @@ module.exports = {
"next": "api-reference-selection-state",
"permalink": "docs/api-reference-entity.html"
},
{
"id": "api-reference-key-binding-util",
"title": "KeyBindingUtil",
"layout": "docs",
"category": "API Reference",
"next": "api-reference-modifier",
"permalink": "docs/api-reference-key-binding-util.html"
},
{
"id": "api-reference-modifier",
"title": "Modifier",
Expand All @@ -160,15 +184,15 @@ module.exports = {
"title": "RichUtils",
"layout": "docs",
"category": "API Reference",
"next": "api-reference-modifier",
"next": "api-reference-atomic-block-utils",
"permalink": "docs/api-reference-rich-utils.html"
},
{
"id": "api-reference-selection-state",
"title": "SelectionState",
"layout": "docs",
"category": "API Reference",
"next": "api-reference-data-conversion",
"next": "api-reference-composite-decorator",
"permalink": "docs/api-reference-selection-state.html"
},
{
Expand Down