From 572a31334fa87b6c1fc8e1b39962f0a6f823b06e Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sat, 19 May 2018 23:34:30 +0100 Subject: [PATCH] add h4, h5 and h6 --- .../views/rooms/MessageComposerInput.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 6c178ce078..30461ca816 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -92,6 +92,9 @@ const BLOCK_TAGS = { h1: 'heading-one', h2: 'heading-two', h3: 'heading-three', + h4: 'heading-four, + h5: 'heading-five', + h6: 'heading-six', li: 'list-item', ol: 'numbered-list', pre: 'code-block', @@ -632,6 +635,9 @@ export default class MessageComposerInput extends React.Component { this.hasBlock('heading-one') || this.hasBlock('heading-two') || this.hasBlock('heading-three') || + this.hasBlock('heading-four') || + this.hasBlock('heading-five') || + this.hasBlock('heading-six') || this.hasBlock('code-block'))) { return change.setBlocks(DEFAULT_NODE); @@ -687,6 +693,9 @@ export default class MessageComposerInput extends React.Component { case 'heading-one': case 'heading-two': case 'heading-three': + case 'heading-four': + case 'heading-five': + case 'heading-six': case 'list-item': case 'code-block': { const isActive = this.hasBlock(type); @@ -1215,6 +1224,12 @@ export default class MessageComposerInput extends React.Component { return

{children}

; case 'heading-three': return

{children}

; + case 'heading-four': + return

{children}

; + case 'heading-five': + return
{children}
; + case 'heading-six': + return
{children}
; case 'list-item': return
  • {children}
  • ; case 'numbered-list':