New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

zoedit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zoedit

A preconfigured, opinionated rich-text editor built on Meta's Lexical for React

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

ZoEdit

License: MIT

A preconfigured, opinionated rich-text editor built on Meta's Lexical for React.

Installation

npm install zoedit

Requires React 18+:

npm install react react-dom

Usage

import { ZoEditor } from 'zoedit';
import { useState } from 'react';

function MyApp() {
  const [content, setContent] = useState();

  return (
    <ZoEditor
      value={content}
      onChange={setContent}
      placeholder="Start writing..."
    />
  );
}

Next.js (App Router)

'use client';

import { ZoEditor } from 'zoedit';
import { useState } from 'react';

export default function Editor() {
  const [content, setContent] = useState();
  return <ZoEditor value={content} onChange={setContent} />;
}

Options

<ZoEditor
  value={content}
  onChange={setContent}
  readOnly={false}
  placeholder="Type here..."
  features={{
    headings: true,   // H1-H6
    lists: true,      // Ordered & unordered
    links: true,      // Hyperlinks
    images: true,     // Images
  }}
/>

Styling

Headless by default. Add your own CSS:

.zoedit-container { /* wrapper */ }
.zoedit-toolbar { /* toolbar */ }
.zoedit-toolbar-button { /* buttons */ }
.zoedit-content-editable { /* editor area */ }
.zoedit-placeholder { /* placeholder text */ }
.zoedit-text-bold { /* bold text */ }
.zoedit-h1, .zoedit-h2, .zoedit-h3 { /* headings */ }
.zoedit-ul, .zoedit-ol { /* lists */ }
.zoedit-link { /* links */ }

See example-styles.css for a complete example.

Development

npm install
npm run dev

Open http://localhost:3000/dev in your browser.

Edit code in src/, save, and refresh browser to see changes.

Publishing

# First time
npm login

# Publish
npm version patch  # or minor/major
npm publish

# Verify
npm view zoedit

API

Props

PropTypeDefaultDescription
valueSerializedEditorStateundefinedCurrent editor state (Lexical JSON)
onChange(value) => voidundefinedCalled when content changes
readOnlybooleanfalseDisable editing
placeholderstring"Start typing..."Empty state text
featuresobjectAll enabledToggle features

Types

import type { ZoEditorProps, ZoEditorFeatures } from 'zoedit';

License

MIT

Keywords

react

FAQs

Package last updated on 21 Dec 2025

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