Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
prosemirror-schema-basic
Advanced tools
The prosemirror-schema-basic package provides a basic schema for ProseMirror, a toolkit for building rich-text editors. This schema includes nodes and marks for common text formatting tasks, such as paragraphs, headings, bold, italic, and links.
Basic Schema
This feature provides a basic schema that includes nodes and marks for common text formatting tasks. The code sample demonstrates how to create a new schema using the basic schema provided by the package.
const { Schema } = require('prosemirror-model');
const { schema } = require('prosemirror-schema-basic');
const mySchema = new Schema({
nodes: schema.spec.nodes,
marks: schema.spec.marks
});
Paragraph Node
This feature allows you to create a paragraph node. The code sample demonstrates how to create a paragraph node using the basic schema.
const { schema } = require('prosemirror-schema-basic');
const paragraphNode = schema.nodes.paragraph.createAndFill();
Bold Mark
This feature allows you to create a bold mark. The code sample demonstrates how to create a bold mark using the basic schema.
const { schema } = require('prosemirror-schema-basic');
const boldMark = schema.marks.strong.create();
The prosemirror-schema-list package provides a schema for handling lists in ProseMirror. It includes nodes and commands for ordered and unordered lists, which are not covered by the basic schema. This package is useful if you need more advanced list handling capabilities.
The prosemirror-schema-table package provides a schema for handling tables in ProseMirror. It includes nodes and commands for creating and manipulating tables, which are not included in the basic schema. This package is useful for applications that require table editing functionality.
[ WEBSITE | ISSUES | FORUM | GITTER | CHANGELOG ]
ProseMirror is a well-behaved rich semantic content editor based on contentEditable, with support for collaborative editing and custom document schemas.
This module defines a basic ProseMirror document schema, whose elements can be reused in other schemas.
The project page has more information, a number of demos and the documentation.
NOTE: This project is in BETA stage. It isn't thoroughly tested,
and the API might still change across 0.x
releases. You are welcome
to use it, but don't expect it to be very stable yet.
This code is released under an MIT license. There's a forum for general discussion and support requests, and the Github bug tracker is the place to report issues.
FAQs
Basic schema elements for ProseMirror
We found that prosemirror-schema-basic 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.