UNPKG

@kedao/editor

Version:

Rich Text Editor Based On Draft.js

75 lines 1.94 kB
import React from 'react'; export const getHeadings = (lang) => [ { key: 'header-one', title: `${lang.controls.header} 1`, text: React.createElement("h1", null, lang.controls.header, " 1"), type: 'block-type', command: 'header-one' }, { key: 'header-two', title: `${lang.controls.header} 2`, text: React.createElement("h2", null, lang.controls.header, " 2"), type: 'block-type', command: 'header-two' }, { key: 'header-three', title: `${lang.controls.header} 3`, text: React.createElement("h3", null, lang.controls.header, " 3"), type: 'block-type', command: 'header-three' }, { key: 'header-four', title: `${lang.controls.header} 4`, text: React.createElement("h4", null, lang.controls.header, " 4"), type: 'block-type', command: 'header-four' }, { key: 'header-five', title: `${lang.controls.header} 5`, text: React.createElement("h5", null, lang.controls.header, " 5"), type: 'block-type', command: 'header-five' }, { key: 'header-six', title: `${lang.controls.header} 6`, text: React.createElement("h6", null, lang.controls.header, " 6"), type: 'block-type', command: 'header-six' }, { key: 'unstyled', title: lang.controls.normal, text: lang.controls.normal, type: 'block-type', command: 'unstyled' } ]; export const blocks = { 'header-one': 'h1', 'header-two': 'h2', 'header-three': 'h3', 'header-four': 'h4', 'header-fiv': 'h5', 'header-six': 'h6', unstyled: 'p', blockquote: 'blockquote' }; //# sourceMappingURL=maps.js.map