Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@ckeditor/ckeditor5-editor-inline
Advanced tools
@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.
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);
});
Quill is a modern WYSIWYG editor built for compatibility and extensibility. It provides a similar inline editing experience and is highly customizable with a wide range of modules and themes. Compared to @ckeditor/ckeditor5-editor-inline, Quill offers a more lightweight and flexible approach but may lack some of the advanced features and plugins available in CKEditor 5.
TinyMCE is another popular WYSIWYG editor that offers both inline and classic editing modes. It is highly configurable and supports a wide range of plugins and integrations. TinyMCE is comparable to @ckeditor/ckeditor5-editor-inline in terms of functionality and extensibility, but it has a different API and plugin architecture.
Froala Editor is a lightweight WYSIWYG HTML editor that offers inline editing capabilities. It is known for its clean design and ease of use. Froala Editor provides a similar user experience to @ckeditor/ckeditor5-editor-inline but focuses more on simplicity and performance.
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 editor implementation is also available in the inline build. Read more about CKEditor 5 Builds.
See the @ckeditor/ckeditor5-editor-inline
package page in CKEditor 5 documentation.
Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the LICENSE.md
file.
FAQs
Inline editor implementation for CKEditor 5.
The npm package @ckeditor/ckeditor5-editor-inline receives a total of 96,050 weekly downloads. As such, @ckeditor/ckeditor5-editor-inline popularity was classified as popular.
We found that @ckeditor/ckeditor5-editor-inline demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.