🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

prosemirror-schema-basic

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-schema-basic

Basic schema elements for ProseMirror

1.2.4
latest
Version published
Weekly downloads
1.7M
3.15%
Maintainers
1
Weekly downloads
 
Created

What is prosemirror-schema-basic?

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.

What are prosemirror-schema-basic's main functionalities?

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();

Other packages similar to prosemirror-schema-basic

FAQs

Package last updated on 18 Mar 2025

Did you know?

Socket

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.

Install

Related posts