@kevin-oisp/kevin-ckeditor

2.4.5 • Public • Published

Kevin Rich Text Editor

Runtime Release License Dependencies

A customized build of CKEditor, a rich text editor.

Development

Quick start

First, install the build from npm:

npm i @kevin-oisp/kevin-ckeditor

If you use in React app, install this package:

npm install --save @ckeditor/ckeditor5-react

And use it in your website:

<div id="editor">
  <p>This is the editor content.</p>
</div>
<script src="./node_modules/@kevin-oisp/kevin-ckeditor/build/index.js"></script>
<script>
  ClassicEditor.create(document.querySelector("#editor"))
    .then((editor) => {
      window.editor = editor;
    })
    .catch((error) => {
      console.error("There was a problem initializing the editor.", error);
    });
</script>

Or in your JavaScript application:

import ClassicEditor from "@kevin-oisp/kevin-ckeditor";

ClassicEditor.create(document.querySelector("#editor"))
  .then((editor) => {
    window.editor = editor;
  })
  .catch((error) => {
    console.error("There was a problem initializing the editor.", error);
  });
import React from "react";
import { CKEditor } from "@ckeditor/ckeditor5-react";
import ClassicEditor from "@kevin-oisp/kevin-ckeditor";

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <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);
          }}
        />
      </header>
    </div>
  );
}

export default App;

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.4.50latest

Version History

VersionDownloads (Last 7 Days)Published
2.4.50
2.4.40
2.4.30
2.4.21
2.4.10
2.4.00
2.3.00
2.2.00
2.1.00
2.0.00
1.1.110
1.1.100
1.1.90
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @kevin-oisp/kevin-ckeditor

Weekly Downloads

1

Version

2.4.5

License

MIT

Unpacked Size

835 kB

Total Files

3

Last publish

Collaborators

  • kevinvn