Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@lexion-rte/core

Latest version: v0.3.0

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: lexion-ret
1 Stars
0 Forks
1 Versions
27 Downloads
TypeScript Repo language

Scan summary

@lexion-rte/core was last scanned on 1 Dec 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 1 Dec 2026.
  • Findings: No rules fired in version 0.3.0.
  • Downloads: 27 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.0 LATEST 1 Dec 2026 No rules fired

No rules fired in 0.3.0

Findings

Findings for v0.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.3.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

This package is part of the Lexion framework-agnostic rich text editor.

Lexion is a framework-agnostic, headless rich text editor platform built on ProseMirror, designed to provide a shared core, reusable extensions, and framework-specific adapters.

@lexion-rte/core

Headless editor runtime for the Lexion platform.

Overview

@lexion-rte/core provides:

  • editor state and schema management
  • command registration/execution
  • status bar item aggregation for adapter UIs
  • extension lifecycle hooks (onCreate, onDestroy)
  • JSON document input/output

This package does not render UI by itself. Pair it with @lexion-rte/starter-kit and optionally an adapter package.

Install

pnpm add @lexion-rte/core

Typical pairing:

pnpm add @lexion-rte/core @lexion-rte/starter-kit

Quick Start

import { LexionEditor } from "@lexion-rte/core";
import { starterKitExtension, starterKitCommandNames } from "@lexion-rte/starter-kit";

const editor = new LexionEditor({
  extensions: [starterKitExtension]
});

editor.execute(starterKitCommandNames.toggleBold);
console.log(editor.getJSON());

Editor Options

LexionEditor accepts:

  • schema?: Schema
  • doc?: JSONDocument
  • extensions?: LexionExtension[]
  • plugins?: LexionPlugin[] (deprecated alias of extensions)
  • branding?: boolean | { text?, align?, className?, style? } (false hides the "Powered by lexion" status bar item)
  • commands?: CommandMap

Core API

Main instance members:

  • schema
  • state
  • doc
  • getJSON()
  • getStatusBarItems()
  • setJSON(document)
  • dispatchTransaction(transaction)
  • execute(command, ...args)
  • can(command, ...args): whether the command could run now, without changing anything (false for unknown commands)
  • registerCommand(name, handler)
  • unregisterCommand(name)
  • use(extension) (throws if the extension provides a schema; pass those to the constructor)
  • removeExtension(key)

use() and removeExtension() reconfigure the state: the document, selection, undo history and the state of the other plugins are kept. doc, setJSON() and the controller's setValue() validate documents and throw Invalid document: <reason> for content the schema does not allow (parseJSONDocument(schema, json) does the same check). After every internal state rebuild core applies one transaction tagged LEXION_INIT_META (and addToHistory: false), so plugins can normalize the document right away.

  • removePlugin(key) (deprecated alias of removeExtension)
  • subscribe(listener) → unsubscribe function
  • isDestroyed
  • destroy()

After destroy(), every member except schema, isDestroyed and destroy() throws.

Subscribing to Changes

subscribe is called after every state change: dispatched transactions (including execute()), setJSON(), and extension add/remove. Adapters use it to keep their views in sync, so commands run on a shared editor (e.g. from a toolbar) update every mounted view.

const unsubscribe = editor.subscribe(({ source, docChanged, transaction, state, previousState }) => {
  // source: "transaction" | "setJSON" | "extensions"
  if (docChanged) {
    save(editor.getJSON());
  }
});

unsubscribe(); // listeners are also cleared on destroy()

Commands

A command handler receives { editor, schema, state, dispatch? }. dispatch is undefined when the command runs through editor.can(): return whether it could run, without changing anything.

Breaking (0.x minor): EditorCommandContext.dispatch is now optional. Handlers written in TypeScript must call dispatch?.(tr) or check if (dispatch).

Commands can be typed by augmenting LexionCommands; the starter kit does this for its commands, so editor.execute("toggleHeading", "2") is a type error. Undeclared names keep accepting any arguments.

declare module "@lexion-rte/core" {
  interface LexionCommands {
    insertTimestamp: [];
  }
}

Status Bar and Branding

Core collects status bar items from extensions as data (getStatusBarItems()). Rendering helpers and the stylesheet (lexionStatusBarStyles) live in @lexion-rte/web; core still re-exports deprecated copies for at least one minor version.

// Hide the "Powered by lexion" item
new LexionEditor({ extensions: [starterKitExtension], branding: false });

// Or customize it
new LexionEditor({
  extensions: [starterKitExtension],
  branding: { text: "Edited with Acme", align: "end", className: "acme-badge" }
});

resolveBrandingStatusItem(branding) returns the branding item for a branding value. For custom renderers, import splitStatusBarItems, getStatusBarGroupClassName, getStatusBarItemClassName and lexionStatusBarAppearance from @lexion-rte/web (the core exports are deprecated).

Custom Command Example

import { LexionEditor } from "@lexion-rte/core";
import { starterKitExtension } from "@lexion-rte/starter-kit";

const editor = new LexionEditor({ extensions: [starterKitExtension] });

editor.registerCommand("insertTimestamp", ({ state, dispatch }) => {
  if (dispatch) {
    const { from, to } = state.selection;
    dispatch(state.tr.insertText(new Date().toISOString(), from, to));
  }
  return true;
});

editor.can("insertTimestamp"); // true
editor.execute("insertTimestamp");

Extension Lifecycle Example

import type { LexionExtension } from "@lexion-rte/core";

const auditExtension: LexionExtension = {
  key: "audit",
  onCreate: ({ editor }) => {
    console.log("created", editor.getJSON());
  },
  onDestroy: () => {
    console.log("destroyed");
  }
};

Status Bar Example

import type { LexionExtension } from "@lexion-rte/core";

const metricsExtension: LexionExtension = {
  key: "metrics",
  statusBarItems: ({ doc }) => [
    {
      key: "characters",
      text: `${doc.textContent.length} chars`
    }
  ]
};

Error Behavior

  • Executing an unknown command throws Unknown command: <name>.
  • Using an editor after destroy() throws an error.
  • Registering duplicate command names throws.

Related Packages

  • @lexion-rte/starter-kit for community editing features
  • private commercial packages for non-public features
  • @lexion-rte/tools for HTML/text conversions
  • adapter packages (web, react, vue, etc.) for UI integration

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @lexion-rte/core

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229