Lexical-Text-Editor

@innoviatech/lexical-text-editor v2.0

A powerful, customizable rich text editor component built with Lexical and React. Features a modern toolbar, image support, video embedding, and comprehensive text formatting options.

Editor Preview

What’s New in v2.0

Features

Installation

npm install @innoviatech/lexical-text-editor

No Peer Dependencies Required! πŸŽ‰

Version 2.0 eliminates the need for Tailwind CSS and multiple UI libraries. Just install the package and start using it!

Quick Start

import React, { useState } from 'react';
import { LexicalTextEditor } from '@innoviatech/lexical-text-editor';
import '@innoviatech/lexical-text-editor/style.css';

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

  return (
    <>
      <LexicalTextEditor
        name="my-editor"
        value={content}
        onChange={setContent}
        placeholder="Start typing your content here..."
      />
    </>
  );
}

export default App;

Props

Prop Type Required Default Description
name string Yes β€” Unique identifier for the editor instance
value string Yes β€” Current editor content (HTML string)
onChange (value: string) => void Yes β€” Callback fired when content changes
placeholder string No "Some Text" Placeholder text when editor is empty
maxWidth string No β€œ1090px” Adjust the maximum width accoding to the need (β€˜80%’ or β€˜800px’)
height string No β€œ500px” Adjust the height accoding to the need (β€˜50vh’ or β€˜500px’)

Advanced Usage

With Initial Content

import React, { useState } from 'react';
import { LexicalTextEditor } from '@innoviatech/lexical-text-editor';
import '@innoviatech/lexical-text-editor/style.css';

function App() {
  const [content, setContent] = useState('<p>Welcome to the editor!</p><ul><li>Feature 1</li><li>Feature 2</li></ul>');

  const handleSave = () => {
    console.log('Current content:', content);
  };

  return (
    <form onSubmit={handleSave}>
      <LexicalTextEditor
        name="content-editor"
        value={content}
        onChange={setContent}
        placeholder="Write your content..."
        maxWidth="600px"
        height="400px"
      />
      <button type="submit">Save Content</button>
    </form>
  );
}

export default App;

Toolbar Features

Browser Support

Troubleshooting

Version Compatibility

License

MIT Β© Innoviatech

Support & Community

Get Help

We’re here to help you succeed with our editor! Here are the best ways to get support:

Report an Issue

Found a bug or experiencing problems?
πŸ‘‰ Open a GitHub Issue

Please include:

Request a Feature

Have an idea to make the editor even better?
✨ Submit a Feature Request

Documentation

Getting Started Guide

Video Tutorials

Community

Join our growing community of developers:

Platform Link Best For
GitHub Discussions Join Discussion Questions & ideas

Contribute

Love our editor? Here’s how you can contribute:

Ways to Contribute

About Innoviatech

Our Mission

At Innoviatech, we believe that creating great digital experiences should be accessible to every developer. We build tools that empower teams to focus on what matters most.

Built with Passion

β€œGreat tools shouldn’t get in the way of great ideas. That’s why we build editors that feel like an extension of your creativity.”

Star Us on GitHub!

If you find this project helpful, please consider giving it a star on GitHub. It helps us reach more developers like you!

Star on GitHub

npm version


Made with ❀️ by the Innoviatech team