CKEditor 5 Custom Online Build

0.0.6 · active · verified Tue Apr 21

This package (`ckeditor5-custom-build`) is a foundational repository generated by the CKEditor 5 Online Builder tool, providing a customizable starting point for a rich-text editor. It is not a directly consumable NPM library but rather the source code and build configuration for a tailored CKEditor 5 instance. As a custom build, its version (0.0.6) reflects its initial state as a template, with no regular release cadence for this specific package. Users are expected to modify, build, and integrate the output into their applications. Key differentiators include the ability to hand-pick features and plugins from the CKEditor 5 ecosystem and self-host the resulting editor, offering complete control over the bundle size and included functionalities, contrasting with pre-built distributions like `@ckeditor/ckeditor5-build-classic`. It's primarily intended for web applications that need a highly specific rich-text editing experience, allowing for granular control over toolbar items, plugin configurations, and overall editor behavior.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to include and initialize a custom CKEditor 5 classic build in a basic HTML page. It assumes the project has been built via `npm run build`, creating `build/ckeditor.js` and `build/ckeditor.css`.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CKEditor 5 Custom Build Quickstart</title>
    <!-- The editor CSS can be bundled or linked directly -->
    <link rel="stylesheet" href="./build/ckeditor.css">
</head>
<body>
    <h1>My Custom CKEditor 5 Instance</h1>

    <div id="editor">
        <p>This is the initial content of the editor.</p>
    </div>

    <script src="./build/ckeditor.js"></script>
    <script>
        ClassicEditor
            .create( document.querySelector( '#editor' ), {
                // Optional: Your license key if using premium features
                // licenseKey: process.env.CKEDITOR_LICENSE_KEY ?? '',

                // Optional: Configuration for real-time collaboration
                // collaboration: {
                //     channelId: 'my-document-id',
                //     webSocketUrl: 'ws://localhost:3000',
                //     uploadUrl: 'http://localhost:3000/upload'
                // }
            } )
            .then( editor => {
                window.editor = editor;
                console.log( 'CKEditor 5 ClassicEditor was successfully initialized!', editor );
            } )
            .catch( error => {
                console.error( 'There was a problem initializing the editor.', error );
                console.error( 'Error details:', error.message );
            } );
    </script>
</body>
</html>

view raw JSON →