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

@lexical/headless

Package Overview
Dependencies
Maintainers
5
Versions
229
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/headless - npm Package Compare versions

Comparing version 0.13.1 to 0.14.0

LexicalHeadless.dev.esm.js

2

index.d.ts

@@ -12,3 +12,3 @@ /** @module @lexical/headless */

* Generates a headless editor that allows lexical to be used without the need for a DOM, eg in Node.js.
* Throws an error when unsupported metehods are used.
* Throws an error when unsupported methods are used.
* @param editorConfig - The optional lexical editor configuration.

@@ -15,0 +15,0 @@ * @returns - The configured headless editor.

@@ -15,3 +15,3 @@ /**

* Generates a headless editor that allows lexical to be used without the need for a DOM, eg in Node.js.
* Throws an error when unsupported metehods are used.
* Throws an error when unsupported methods are used.
* @param editorConfig - The optional lexical editor configuration.

@@ -18,0 +18,0 @@ * @returns - The configured headless editor.

@@ -8,3 +8,3 @@ /**

'use strict'
const LexicalHeadless = process.env.NODE_ENV === 'development' ? require('./LexicalHeadless.dev.js') : require('./LexicalHeadless.prod.js')
const LexicalHeadless = process.env.NODE_ENV === 'development' ? require('./LexicalHeadless.dev.js') : require('./LexicalHeadless.prod.js');
module.exports = LexicalHeadless;

@@ -11,6 +11,6 @@ {

"license": "MIT",
"version": "0.13.1",
"version": "0.14.0",
"main": "LexicalHeadless.js",
"peerDependencies": {
"lexical": "0.13.1"
"lexical": "0.14.0"
},

@@ -21,3 +21,5 @@ "repository": {

"directory": "packages/lexical-headless"
}
},
"module": "LexicalHeadless.esm.js",
"sideEffects": false
}
# `@lexical/headless`
[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_headless)
This package allows you to interact with Lexical in a headless environment (one that does not rely on DOM, e.g. for Node.js environment), and use its

@@ -43,3 +45,3 @@ main features like editor.update(), editor.registerNodeTransform(), editor.registerUpdateListener()

const articleEditorStateJSON = await loadArticleBody(req.query.id);
editor.setEditorState(editor.parseEditorState(articleEditorStateJSON));
editor.setEditorState(editor.parseEditorState(articleEditorStateJSON));

@@ -46,0 +48,0 @@ editor.update(() => {

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