You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-editor-inline

Package Overview
Dependencies
2
Maintainers
0
Versions
532
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-editor-inline

Inline editor implementation for CKEditor 5.


Version published
Weekly downloads
132K
increased by5.89%
Maintainers
0
Created
Weekly downloads
 

Package description

What is @ckeditor/ckeditor5-editor-inline?

@ckeditor/ckeditor5-editor-inline is a package that provides an inline editor for CKEditor 5. This editor allows users to edit content directly within the context of the page, without the need for a separate editing interface. It is particularly useful for applications where a seamless editing experience is desired.

What are @ckeditor/ckeditor5-editor-inline's main functionalities?

Basic Inline Editor Initialization

This code initializes a basic inline editor on an HTML element with the ID 'editor'. It demonstrates how to create an instance of the inline editor and handle the promise returned by the create method.

const InlineEditor = require('@ckeditor/ckeditor5-editor-inline/src/inlineeditor');

InlineEditor.create(document.querySelector('#editor'))
    .then(editor => {
        console.log('Editor was initialized', editor);
    })
    .catch(error => {
        console.error(error.stack);
    });

Adding Plugins

This code demonstrates how to initialize the inline editor with additional plugins such as Bold and Italic. It also configures the toolbar to include buttons for these plugins.

const InlineEditor = require('@ckeditor/ckeditor5-editor-inline/src/inlineeditor');
const Essentials = require('@ckeditor/ckeditor5-essentials/src/essentials');
const Bold = require('@ckeditor/ckeditor5-basic-styles/src/bold');
const Italic = require('@ckeditor/ckeditor5-basic-styles/src/italic');

InlineEditor.create(document.querySelector('#editor'), {
    plugins: [ Essentials, Bold, Italic ],
    toolbar: [ 'bold', 'italic' ]
})
.then(editor => {
    console.log('Editor with plugins was initialized', editor);
})
.catch(error => {
    console.error(error.stack);
});

Custom Configuration

This code shows how to initialize the inline editor with a custom configuration. It sets up a toolbar with specific items, changes the language to Spanish, and adds a placeholder text.

const InlineEditor = require('@ckeditor/ckeditor5-editor-inline/src/inlineeditor');

InlineEditor.create(document.querySelector('#editor'), {
    toolbar: {
        items: [ 'bold', 'italic', 'link' ]
    },
    language: 'es',
    placeholder: 'Type your text here...'
})
.then(editor => {
    console.log('Custom configured editor was initialized', editor);
})
.catch(error => {
    console.error(error.stack);
});

Other packages similar to @ckeditor/ckeditor5-editor-inline

Readme

Source

CKEditor 5 inline editor implementation

npm version Coverage Status Build Status

The inline editor implementation for CKEditor 5.

This package exposes the InlineEditor class. Follow there to learn more about this type of editor and how to initialize it.

This package contains the source version of the inline editor. This kind of editor implementation is also available as a ready-to-use inline build. Read more about CKEditor 5 predefined builds in the CKEditor 5 documentation.

Documentation

See the @ckeditor/ckeditor5-editor-inline package page in CKEditor 5 documentation.

Installation

npm install ckeditor5

License

Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md file or https://ckeditor.com/legal/ckeditor-oss-license.

Keywords

FAQs

Package last updated on 26 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc