How to use the draft-js-buttons/lib/utils/createInlineStyleButton function in draft-js-buttons

To help you get started, we’ve selected a few draft-js-buttons 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 plone / volto / src / config / RichTextEditor / Styles.jsx View on Github external
import boldSVG from '../../icons/bold.svg';
import italicSVG from '../../icons/italic.svg';
import textSVG from '../../icons/text.svg';
import subtextSVG from '../../icons/subtext.svg';
import unorderedListSVG from '../../icons/list-bullet.svg';
import orderedListSVG from '../../icons/list-numbered.svg';
import blockquoteSVG from '../../icons/quote.svg';
import calloutSVG from '../../icons/megaphone.svg';

const BoldButton = createInlineStyleButton({
  style: 'BOLD',
  children: ,
});

const ItalicButton = createInlineStyleButton({
  style: 'ITALIC',
  children: ,
});

const HeadlineTwoButton = createBlockStyleButton({
  blockType: 'header-two',
  children: ,
});

const HeadlineThreeButton = createBlockStyleButton({
  blockType: 'header-three',
  children: ,
});

const UnorderedListButton = createBlockStyleButton({
  blockType: 'unordered-list-item',
github plone / volto / src / config / RichTextEditor / Styles.jsx View on Github external
import React from 'react';
import createInlineStyleButton from 'draft-js-buttons/lib/utils/createInlineStyleButton';
import createBlockStyleButton from 'draft-js-buttons/lib/utils/createBlockStyleButton';

import Icon from '../../components/theme/Icon/Icon';

import boldSVG from '../../icons/bold.svg';
import italicSVG from '../../icons/italic.svg';
import textSVG from '../../icons/text.svg';
import subtextSVG from '../../icons/subtext.svg';
import unorderedListSVG from '../../icons/list-bullet.svg';
import orderedListSVG from '../../icons/list-numbered.svg';
import blockquoteSVG from '../../icons/quote.svg';
import calloutSVG from '../../icons/megaphone.svg';

const BoldButton = createInlineStyleButton({
  style: 'BOLD',
  children: ,
});

const ItalicButton = createInlineStyleButton({
  style: 'ITALIC',
  children: ,
});

const HeadlineTwoButton = createBlockStyleButton({
  blockType: 'header-two',
  children: ,
});

const HeadlineThreeButton = createBlockStyleButton({
  blockType: 'header-three',