diff --git a/examples/rich/rich.html b/examples/rich/rich.html index ae7cc55897..d9596142e8 100644 --- a/examples/rich/rich.html +++ b/examples/rich/rich.html @@ -159,6 +159,10 @@ const BLOCK_TYPES = [ {label: 'H1', style: 'header-one'}, {label: 'H2', style: 'header-two'}, + {label: 'H3', style: 'header-three'}, + {label: 'H4', style: 'header-four'}, + {label: 'H5', style: 'header-five'}, + {label: 'H6', style: 'header-six'}, {label: 'Blockquote', style: 'blockquote'}, {label: 'UL', style: 'unordered-list-item'}, {label: 'OL', style: 'ordered-list-item'}, diff --git a/src/model/encoding/convertFromHTMLToContentBlocks.js b/src/model/encoding/convertFromHTMLToContentBlocks.js index 217e2e4007..5626326974 100644 --- a/src/model/encoding/convertFromHTMLToContentBlocks.js +++ b/src/model/encoding/convertFromHTMLToContentBlocks.js @@ -122,6 +122,14 @@ function getBlockTypeForTag(tag: string, lastList: ?string): DraftBlockType { return 'header-one'; case 'h2': return 'header-two'; + case 'h3': + return 'header-three'; + case 'h4': + return 'header-four'; + case 'h5': + return 'header-five'; + case 'h6': + return 'header-six'; case 'li': if (lastList === 'ol') { return 'ordered-list-item';