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

Add Section and Article to DefaultBlockRenderMap #2212

Closed
wants to merge 3 commits into from
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
4 changes: 3 additions & 1 deletion src/model/constants/DraftBlockType.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export type CoreDraftBlockType =
| 'ordered-list-item'
| 'blockquote'
| 'code-block'
| 'atomic';
| 'atomic'
| 'section'
| 'article';

/**
* User defined types can be of any valid string.
Expand Down
6 changes: 6 additions & 0 deletions src/model/immutable/DefaultDraftBlockRenderMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ const DefaultDraftBlockRenderMap: DefaultCoreDraftBlockRenderMap = Map({
'header-six': {
element: 'h6',
},
section: {
Tarun047 marked this conversation as resolved.
Show resolved Hide resolved
element: 'section',
},
article: {
element: 'article',
},
'unordered-list-item': {
element: 'li',
wrapper: UL_WRAP,
Expand Down