Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prosemirror-schema-basic

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

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.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
decreased by-0.2%
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 14 Jul 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc