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

Commit e20f79f

Browse files
Tarun047facebook-github-bot
authored andcommitted
Add Section and Article to DefaultBlockRenderMap (#2212)
Summary: *Before* submitting a pull request, please make sure the following is done... 1. Fork the repo and create your branch from `master`. 2. If you've added code that should be tested, add tests! 3. If you've changed APIs, update the documentation. 4. Ensure that: * The test suite passes (`npm test`) * Your code lints (`npm run lint`) and passes Flow (`npm run flow`) * You have followed the [testing guidelines](https://github.com/facebook/draft-js/wiki/Testing-for-Pull-Requests) 5. If you haven't already, complete the [CLA](https://code.facebook.com/cla). Please use the simple form below as a guideline for describing your pull request. Thanks for contributing to Draft.js! - **Summary** Fixes #2074 Updated the default block render map to have the section and article tags. Pull Request resolved: #2212 Reviewed By: claudiopro Differential Revision: D18246366 Pulled By: mrkev fbshipit-source-id: 144f7721d92d6efcbb5c969ba992841eb9bd5f15
1 parent 6fc9964 commit e20f79f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/model/constants/DraftBlockType.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export type CoreDraftBlockType =
2727
| 'ordered-list-item'
2828
| 'blockquote'
2929
| 'code-block'
30-
| 'atomic';
30+
| 'atomic'
31+
| 'section'
32+
| 'article';
3133

3234
/**
3335
* User defined types can be of any valid string.

src/model/immutable/DefaultDraftBlockRenderMap.js

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ const DefaultDraftBlockRenderMap: DefaultCoreDraftBlockRenderMap = Map({
4747
'header-six': {
4848
element: 'h6',
4949
},
50+
section: {
51+
element: 'section',
52+
},
53+
article: {
54+
element: 'article',
55+
},
5056
'unordered-list-item': {
5157
element: 'li',
5258
wrapper: UL_WRAP,

0 commit comments

Comments
 (0)