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

@tozd/prosemirror

Latest version: v0.4.0

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: mitar
2 Versions
31 Downloads

Scan summary

@tozd/prosemirror was last scanned on 1 Dec 2026 at version 0.4.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 1 Dec 2026.
  • Findings: No rules fired in version 0.4.0.
  • Downloads: 31 downloads.

Versions

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

No rules fired in 0.4.0

Findings

Findings for v0.4.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.4.0; other versions have their own rules, not their own score.

README

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

Go port of ProseMirror

NPM

A Go port of ProseMirror for server-side parsing, validation, and canonical HTML serialization of documents, with a TypeScript companion (the @tozd/prosemirror NPM package) that builds the same schema in the browser from the same shareable JSON.

The components currently available:

  • model package, ported from prosemirror-model v1.25.13 – the document model: schemas, nodes, marks, content expressions, HTML fragment parsing, and canonical HTML serialization.

Each ported component mirrors the structure of its ProseMirror TypeScript source so the two can be kept in sync. See PORTING.md for the porting contract.

It is used by PeerDB, a collaborative database.

Installation

Go installation

You can add it to your project using go get:

go get gitlab.com/tozd/go/prosemirror/model

It requires Go 1.27 or newer.

TypeScript/JavaScript installation

You can add frontend utilities for Go port of ProseMirror to your project using npm:

npm install --save @tozd/prosemirror prosemirror-model

It requires node 24 or newer.

Usage

Go usage
schema, errE := model.NewSchema(schemaJSON, map[string]model.AttrValidator{
  "linkURL": validateLinkURL,
})
if errE != nil {
  // Handle the error.
}

doc, errE := model.ParseHTML(schema, `<p>Hello, <b>world</b>!</p>`, model.ParseOptions{})
if errE != nil {
  // Handle the error.
}

canonical := model.SerializeHTML(doc)

ok, errE := model.IsCanonicalHTML(schema, canonical, model.ParseOptions{})
// ok is true: serializing a parsed document always yields the canonical form.

See full package documentation with examples on pkg.go.dev.

TypeScript/JavaScript usage

The same schema JSON can be built into a ProseMirror schema in the browser:

import { buildSchema } from "@tozd/prosemirror"

const schema = buildSchema(schemaJSON, { validators: { linkURL: validateLinkURL } })

buildSchema accepts a parsed schema JSON object and callbacks with a registry of named attribute validators and returns a prosemirror-model Schema, with parseDOM and toDOM derived from the dialect, the browser-usable counterpart of model.NewSchema. Attribute values are validated as in Go: when nodes and marks are created (and so in Node.fromJSON), by Node.check, and when attributes are extracted from HTML. prosemirror-model is a peer dependency. The frontend and the Go backend build the same schema from one shared JSON definition.

Schema JSON dialect

Schemas are described by a single JSON document that can be shared with a ProseMirror TypeScript implementation. Functions cannot live in JSON, so attribute validators are referenced by name (resolved against a registry passed to model.NewSchema) and the HTML mapping is declarative (toHTML and parseHTML keys on nodes and marks). model.NewSchema accepts any spec in this dialect, not only the example schema shipped as a fixture: toHTML covers the declarative subset of ProseMirror's DOMOutputSpec (including nested elements such as a code block rendered as pre wrapping code), and parseHTML accepts a full CSS selector in tag (matched with cascadia), style rules keyed on an inline CSS declaration ({"style": "font-weight=bold"}), and a namespace constraint, alongside context and priority. See PORTING.md for the full specification of the dialect.

The one documented fidelity boundary is style matching: a style rule matches only an element's own inline longhand declarations and does not perform CSSOM shorthand expansion, checking of values against the property grammar, or value normalization. So style="font-weight: bold" matches a font-weight rule, but style="font: bold 12px serif" (which exposes font-weight only after shorthand expansion in a browser) does not. Everything else parses identically to the browser. Editor-only behaviors and the transform and collaboration layers are out of scope.

Related projects

  • prosemirror-go – a similar port which is somewhat stale and is licensed under AGPL.

GitHub mirror

There is also a read-only GitHub mirror available, if you need to fork the project there.

Disclaimer

Port has been fully generated and maintained by AI.

License

Licensed under the Apache License, Version 2.0 (see LICENSE). The ported packages are derivative works of the corresponding ProseMirror packages, used under the MIT license (see NOTICE).

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 @tozd/prosemirror

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

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

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