CKEditor5 - How to add Clipboard buttons to the Toolbar in React

Viewed 116

I'm trying to customize the CKeditor5 Toolbar in a React jsx file, but i can't manage how to get the Clipboard "Paste" button visible in the Inline Editor.

This is my file:

import React, { Component } from 'react';
import { CKEditor } from '@ckeditor/ckeditor5-react';
import InlineEditor from '@ckeditor/ckeditor5-build-classic';

const editorConfiguration = {
    toolbar: [ 'imageUpload','undo', 'redo', 'paste'],
  };



class Editable extends Component {
    render() {
        return (
            <div id="Editable" className="Editable">
                <CKEditor
                    editor={ InlineEditor }
                    data=""
                    config={ editorConfiguration }
                    onReady={ editor => {
                        // You can store the "editor" and use when it is needed.
                        console.log( 'Editor is ready to use!', editor );
                    } }
                    onChange={ ( event, editor ) => {
                        const data = editor.getData();
                        console.log( { event, editor, data } );
                    } }
                    onBlur={ ( event, editor ) => {
                        console.log( 'Blur.', editor );
                    } }
                    onFocus={ ( event, editor ) => {
                        console.log( 'Focus.', editor );
                    } }
                />
            </div>
        );
    }
}

export default Editable;

0 Answers
Related