Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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 | CHANGELOG ]
This is a schema module for ProseMirror. 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 examples and the documentation.
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.
We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.
1.2.3 (2024-07-14)
Add attribute type validation for headings, images, and link marks.
FAQs
Basic schema elements for ProseMirror
The npm package prosemirror-schema-basic receives a total of 1,023,745 weekly downloads. As such, prosemirror-schema-basic popularity was classified as popular.
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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.