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

@udecode/plate-core

Package Overview
Dependencies
Maintainers
3
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@udecode/plate-core

The core of Plate – a plugin system for slate

  • 40.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
128K
increased by0.88%
Maintainers
3
Weekly downloads
 
Created

What is @udecode/plate-core?

@udecode/plate-core is a core package for the Plate rich text editor framework. It provides a set of tools and utilities to build customizable and extensible rich text editors in React. The package offers a modular architecture, allowing developers to add or remove features as needed.

What are @udecode/plate-core's main functionalities?

Customizable Editor

This feature allows you to create a customizable editor by using the `createPlateUI` function. You can define your own components and pass them to the `Plate` component.

import { createPlateUI, Plate } from '@udecode/plate-core';

const MyEditor = () => {
  const components = createPlateUI();
  return <Plate components={components} />;
};

Plugins

This feature allows you to add plugins to the editor. In this example, the `createBoldPlugin` is used to add bold text functionality to the editor.

import { createPlateUI, Plate } from '@udecode/plate-core';
import { createBoldPlugin } from '@udecode/plate-basic-marks';

const MyEditor = () => {
  const components = createPlateUI();
  const plugins = [createBoldPlugin()];
  return <Plate components={components} plugins={plugins} />;
};

Serialization

This feature allows you to serialize the editor content to HTML. The `serializeHtml` function takes the editor nodes and converts them to an HTML string.

import { serializeHtml } from '@udecode/plate-core';

const html = serializeHtml({
  nodes: [
    { type: 'paragraph', children: [{ text: 'Hello, world!' }] }
  ]
});
console.log(html);

Other packages similar to @udecode/plate-core

Keywords

FAQs

Package last updated on 13 Nov 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