From fedd125db002bbd6e42d9f016b0778adcec26367 Mon Sep 17 00:00:00 2001 From: Tarun047 <32017154+Tarun047@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:38:48 +0530 Subject: [PATCH 1/3] Add Section and Article to DefaultBlockRenderMap --- src/model/immutable/DefaultDraftBlockRenderMap.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/model/immutable/DefaultDraftBlockRenderMap.js b/src/model/immutable/DefaultDraftBlockRenderMap.js index 34d867d199..ac558eaaf9 100644 --- a/src/model/immutable/DefaultDraftBlockRenderMap.js +++ b/src/model/immutable/DefaultDraftBlockRenderMap.js @@ -47,6 +47,12 @@ const DefaultDraftBlockRenderMap: DefaultCoreDraftBlockRenderMap = Map({ 'header-six': { element: 'h6', }, + 'section': { + element: 'section', + }, + 'article': { + element: 'article', + }, 'unordered-list-item': { element: 'li', wrapper: UL_WRAP, From dd6a55fe064e909fc6aa520eb2eefec7bd7d8e33 Mon Sep 17 00:00:00 2001 From: Tarun047 <32017154+Tarun047@users.noreply.github.com> Date: Mon, 14 Oct 2019 16:06:34 +0530 Subject: [PATCH 2/3] Update DefaultDraftBlockRenderMap.js --- src/model/immutable/DefaultDraftBlockRenderMap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/immutable/DefaultDraftBlockRenderMap.js b/src/model/immutable/DefaultDraftBlockRenderMap.js index ac558eaaf9..dc36ac9707 100644 --- a/src/model/immutable/DefaultDraftBlockRenderMap.js +++ b/src/model/immutable/DefaultDraftBlockRenderMap.js @@ -47,10 +47,10 @@ const DefaultDraftBlockRenderMap: DefaultCoreDraftBlockRenderMap = Map({ 'header-six': { element: 'h6', }, - 'section': { + section: { element: 'section', }, - 'article': { + article: { element: 'article', }, 'unordered-list-item': { From f11205f80f3bbb88dd2071ae84217fa8aaa383a6 Mon Sep 17 00:00:00 2001 From: Tarun047 <32017154+Tarun047@users.noreply.github.com> Date: Mon, 18 Nov 2019 19:25:41 +0530 Subject: [PATCH 3/3] Update DraftBlockType.js --- src/model/constants/DraftBlockType.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/model/constants/DraftBlockType.js b/src/model/constants/DraftBlockType.js index e2168146b2..9acb253dc6 100644 --- a/src/model/constants/DraftBlockType.js +++ b/src/model/constants/DraftBlockType.js @@ -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.