Written by Anonymous

registerFormatType( FORMAT_TYPE_NAME, {
  title: __( '文字', THEME_NAME ),
  tagName: 'span',
  className: 'letters',
  edit( { isActive, value, onChange } ) {
    var cursolPositionObject = value.formats[value.start];
    var type = cursolPositionObject ? cursolPositionObject[0].type : '';

    return (
      <Fragment>
        <BlockControls>
          <Toolbar>
            <DropdownMenu
              icon="editor-textcolor"
              label={__( '文字', THEME_NAME )}
              className='letters'
              controls={ [
                  {
                      title: <span className="bold">{__( '太字(boldクラス指定)', THEME_NAME )}</span>,
                      icon: 'editor-bold',
                      className: 'bold',
                      isActive: type === 'cocoon-blocks/bold',
                      onClick: () => onChange( toggleFormat( value, { type: 'cocoon-blocks/bold' } ) )
                  },
Notepad
Select All