How to use the draftail.BLOCK_TYPE.HEADER_ONE function in draftail

To help you get started, we’ve selected a few draftail examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mirumee / saleor-dashboard / src / components / RichTextEditor / RichTextEditor.tsx View on Github external
})}
    >
      <div>
        
          {label}
        
         0 ? initial : null
          }
          onSave={value =&gt; handleSave(value, initial, name, onChange)}
          blockTypes={[
            {
              icon: ,
              type: BLOCK_TYPE.HEADER_ONE
            },
            { icon: , type: BLOCK_TYPE.HEADER_TWO },
            { icon: , type: BLOCK_TYPE.HEADER_THREE },
            { icon: , type: BLOCK_TYPE.BLOCKQUOTE },
            {
              icon: ,
              type: BLOCK_TYPE.UNORDERED_LIST_ITEM
            },
            { icon: , type: BLOCK_TYPE.ORDERED_LIST_ITEM }
          ]}
          inlineStyles={[
            {
              icon: ,
              type: INLINE_STYLE.BOLD
            },
            {</div>
github medialab / website / admin / src / components / Editor.js View on Github external
const {content} = this.props;
    return (
      <div>
        }}
          rawContentState={content ? htmlToRaw(content) : null}
          stripPastedStyles={false}
          onSave={this.handleOnSave}
          entityTypes={[
            LINK,
            IMAGE,
            IFRAME
          ]}
          blockTypes={[
            {type: BLOCK_TYPE.HEADER_ONE, icon: h1},
            {type: BLOCK_TYPE.HEADER_TWO, icon: h2},
            {type: BLOCK_TYPE.HEADER_THREE, icon: h3},
            {type: BLOCK_TYPE.BLOCKQUOTE, icon: },
            {type: BLOCK_TYPE.UNORDERED_LIST_ITEM, icon: },
            {type: BLOCK_TYPE.ORDERED_LIST_ITEM, icon: },
            {type: BLOCK_TYPE.CODE, icon: }
          ]}
          inlineStyles={[
            {type: INLINE_STYLE.ITALIC, icon: },
            {type: INLINE_STYLE.BOLD, icon: }
          ]} /&gt;
      </div>
    );
  }
}
github mirumee / saleor / saleor / static / dashboard-next / components / RichTextEditor / RichTextEditor.tsx View on Github external
key={JSON.stringify(initial)}
          rawContentState={
            initial &amp;&amp; Object.keys(initial).length &gt; 0 ? initial : null
          }
          onSave={value =&gt;
            onChange({
              target: {
                name,
                value
              }
            } as any)
          }
          blockTypes={[
            {
              icon: ,
              type: BLOCK_TYPE.HEADER_ONE
            },
            { icon: , type: BLOCK_TYPE.HEADER_TWO },
            { icon: , type: BLOCK_TYPE.HEADER_THREE },
            { icon: , type: BLOCK_TYPE.BLOCKQUOTE },
            {
              icon: ,
              type: BLOCK_TYPE.UNORDERED_LIST_ITEM
            },
            { icon: , type: BLOCK_TYPE.ORDERED_LIST_ITEM }
          ]}
          inlineStyles={[
            {
              icon: ,
              type: INLINE_STYLE.BOLD
            },
            {