Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

install ckeditor 5 for react js

npm install --save @ckeditor/ckeditor5-react @ckeditor/ckeditor5-build-classic

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

class App extends Component {
    render() {
        return (
            <div className="App">
                <h2>Using CKEditor 5 build in React</h2>
                <CKEditor
                    editor={ ClassicEditor }
                    data="<p>Hello from CKEditor 5!</p>"
                    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 App;
Comment

PREVIOUS NEXT
Code Example
Javascript :: nuxt axios middleware 
Javascript :: what is cdn react 
Javascript :: js convert array of arrays to array 
Javascript :: react native get uri of the image in the app assets folder 
Javascript :: download json file react 
Javascript :: get value of radio button javascript 
Javascript :: nodejs mysql getting the id of an inserted row 
Javascript :: check if input is valid js 
Javascript :: past value from parent in reactjs 
Javascript :: toast in angular not working 
Javascript :: how to scroll to an element javascript react 
Javascript :: slide out navigation 
Javascript :: javascript easiest way to get second parent 
Javascript :: change image src onclick javascript 
Javascript :: float to euro curency 
Javascript :: object deep copy 
Javascript :: custom event js 
Javascript :: react proxy 
Javascript :: express js npm 
Javascript :: react-fragment 
Javascript :: javascript create array with null values 
Javascript :: add text to string javascript 
Javascript :: Remove Duplicates array values in javascript 
Javascript :: jquery change tabs 
Javascript :: useparams example 
Javascript :: javascript decode a sting in base64 
Javascript :: urlencoded limit nodejs express 
Javascript :: jquery change title of page 
Javascript :: javascript join list of string 
Javascript :: javascript browser tab active 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =