New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prosemirror-utils

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-utils - npm Package Compare versions

Comparing version 0.8.3 to 0.9.0

2

package.json
{
"name": "prosemirror-utils",
"version": "0.8.3",
"version": "0.9.0",
"description": "Utils library for ProseMirror",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -826,3 +826,3 @@ # Utils library for ProseMirror

* **`replaceSelectedNode`**`(node: ProseMirrorNode) → fn(tr: Transaction) → Transaction`\
Returns a new transaction that replaces selected node with a given `node`.
Returns a new transaction that replaces selected node with a given `node`, keeping NodeSelection on the new `node`.
It will return the original transaction if either current selection is not a NodeSelection or replacing is not possible.

@@ -850,4 +850,5 @@

* **`safeInsert`**`(content: ProseMirrorNode | Fragment, position: ?number) → fn(tr: Transaction) → Transaction`\
* **`safeInsert`**`(content: ProseMirrorNode | Fragment, position: ?number, tryToReplace: ?boolean) → fn(tr: Transaction) → Transaction`\
Returns a new transaction that inserts a given `content` at the current cursor position, or at a given `position`, if it is allowed by schema. If schema restricts such nesting, it will try to find an appropriate place for a given node in the document, looping through parent nodes up until the root document node.
If `tryToReplace` is true and current selection is a NodeSelection, it will replace selected node with inserted content if its allowed by schema.
If cursor is inside of an empty paragraph, it will try to replace that paragraph with the given content. If insertion is successful and inserted node has content, it will set cursor inside of that content.

@@ -854,0 +855,0 @@ It will return an original transaction if the place for insertion hasn't been found.

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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