Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-theme-lark

Package Overview
Dependencies
Maintainers
1
Versions
696
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-theme-lark

A bright theme for CKEditor 5.

  • 41.4.0-alpha.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @ckeditor/ckeditor5-theme-lark?

@ckeditor/ckeditor5-theme-lark is a theme package for CKEditor 5, providing a modern and clean design for the editor. It includes styles for the editor's UI components, ensuring a consistent look and feel across different platforms and devices.

What are @ckeditor/ckeditor5-theme-lark's main functionalities?

Basic Theme Integration

This code demonstrates how to integrate the Lark theme into a CKEditor 5 instance. It imports the necessary editor and plugin modules, as well as the Lark theme CSS, and initializes the editor with a basic toolbar.

import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import '@ckeditor/ckeditor5-theme-lark/theme/ckeditor.css';

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

Customizing Theme Styles

This code sample shows how to customize the default styles provided by the Lark theme. It imports the Lark theme CSS and then adds custom styles to override the default appearance of the editor's editable area and toolbar.

import '@ckeditor/ckeditor5-theme-lark/theme/ckeditor.css';

const customStyles = `
.ck-editor__editable {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 10px;
}

.ck-toolbar {
    background-color: #333;
    color: #fff;
}
`;

const styleSheet = document.createElement('style');
styleSheet.type = 'text/css';
styleSheet.innerText = customStyles;
document.head.appendChild(styleSheet);

Other packages similar to @ckeditor/ckeditor5-theme-lark

Keywords

FAQs

Package last updated on 18 Apr 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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc