Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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 978,273 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.