<commit_before>import React from 'react';
import ReactDOM from 'react-dom';

import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib';

const mount = document.querySelector('[data-mount-custom]');

const rawContentState = {
    entityMap: {},
    blocks: [
        {
            key: 'c1gc9',
            text: 'You can also implement custom block types as required.',
            type: 'tiny-text',
            depth: 0,
            inlineStyleRanges: [],
            entityRanges: [],
        },
    ],
};

const onSave = contentState => {
    sessionStorage.setItem('custom:contentState', JSON.stringify(contentState));
};

const editor = (
    <DraftailEditor
        rawContentState={rawContentState}
        onSave={onSave}
        stripPastedStyles={false}
        blockTypes={[
            {
                label: 'H2',
                type: BLOCK_TYPE.HEADER_TWO,
                description: 'Heading 2',
            },
            {
                label: 'Tiny',
                type: 'tiny-text',
                element: 'div',
                className: 'u-tinytext',
            },
        ]}
        inlineStyles={[
            {
                type: INLINE_STYLE.BOLD,
                icon: 'icon-bold',
                description: 'Bold',
                style: { fontWeight: 'bold', textShadow: '1px 1px 1px black' },
            },
            {
                label: 'Redacted',
                type: 'REDACTED',<commit_msg>Update redacted custom style definition<commit_after>import React from 'react';
import ReactDOM from 'react-dom';

import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib';

const mount = document.querySelector('[data-mount-custom]');

const rawContentState = {
    entityMap: {},
    blocks: [
        {
            key: 'c1gc9',
            text: 'You can also implement custom block types as required.',
            type: 'tiny-text',
            depth: 0,
            inlineStyleRanges: [],
            entityRanges: [],
        },
    ],
};

const onSave = contentState => {
    sessionStorage.setItem('custom:contentState', JSON.stringify(contentState));
};

const editor = (
    <DraftailEditor
        rawContentState={rawContentState}
        onSave={onSave}
        stripPastedStyles={false}
        blockTypes={[
            {
                label: 'H2',
                type: BLOCK_TYPE.HEADER_TWO,
                description: 'Heading 2',
            },
            {
                label: 'Tiny',
                type: 'tiny-text',
                element: 'div',
                className: 'u-tinytext',
            },
        ]}
        inlineStyles={[
            {
                type: INLINE_STYLE.BOLD,
                icon: 'icon-bold',
                description: 'Bold',
                style: { fontWeight: 'bold', textShadow: '1px 1px 1px black' },
            },
            {
                label: '█',
                type: 'REDACTED',
                description: 'Redacted',
{'fraction_non_alphanumeric': 0.12055070517125588, 'fraction_numerical': 0.005372733378106112, 'mean_word_length': 1.5096882898062343, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4467639', 'n_tokens_mistral': 847, 'n_tokens_neox': 800, 'n_words': 175}