
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
lexical-react-editor
Advanced tools
This is a text editor library I made to support one of my projects
This is a text editor library I made to support one of my projects
It uses lexical library for rich text editing experience in the web https://lexical.dev/
A Example of how to use this library can be found in /website directory of this project and hosted in this link https://lexical-text-editor-2.netlify.app/
import {defaultEditorTheme, Editor, Bold, Italic, AddChecklist, AddIndent, AddUnorderedList} from "lexical-react-editor";
function App() {
return (
<>
<div >
<Editor>
<div className="yourToolbar">
// imported buttons to perform text editing
<Bold />
<Italic />
<AddChecklist />
<AddIndent />
<AddUnorderedList />
</div>
</Editor>
</div>
</>
)
}
Optionally you can pass a theme prop to customize Editor Styling
import {defaultEditorTheme, Editor, Toolbar, Bold, Italic, AddChecklist, AddIndent, AddUnorderedList} from "lexical-react-editor";
<Editor
theme={{
...defaultEditorTheme,
editorClassName: 'yourEditorClassName'
}}
>
<div className="yourToolbar">
// imported buttons to perform text editing
<Bold />
<Italic />
<AddChecklist />
<AddIndent />
<AddUnorderedList />
</div>
</Editor>
Other available properties in defaultEditorTheme are in below interface
interface IDefaultEditorTheme {
editorClassName: string;
placeholderClassName: string;
toolbarClassName?: string;
toolbarButton?: string;
toolbarButtonActive?: string;
defaultFont?: string;
dropdownButtonClassname?: string;
dropdownListClassname?: string;
dropdownItemClassname?: string;
}
Additionally you can make your own lexical nodes and pass it as a props to the editor To add this properly import lexicalComposerContext as below
Doc to how to add a node https://lexical.dev/docs/concepts/nodes
Doc to how to add a plugin https://lexical.dev/docs/react/create_plugin
import {useLexicalComposerContext} from "lexical-react-editor";
<Editor
theme={{
...defaultEditorTheme,
editorClassName: 'yourEditorClassName'
}}
nodes={[
customParagraphNode,
orderedListNode,
]}
>
</Editor>
FAQs
This is a text editor library I made to support one of my projects
We found that lexical-react-editor 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.