Socket
Socket
Sign inDemoInstall

prosemirror-view

Package Overview
Dependencies
Maintainers
1
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-view - npm Package Compare versions

Comparing version 1.31.4 to 1.31.5

2

package.json
{
"name": "prosemirror-view",
"version": "1.31.4",
"version": "1.31.5",
"description": "ProseMirror's view component",

@@ -5,0 +5,0 @@ "type": "module",

@@ -281,3 +281,3 @@ import {Selection, NodeSelection, TextSelection, AllSelection, EditorState} from "prosemirror-state"

return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodes(view, -1)
} else if (code == 46 || (browser.mac && code == 68 && mods == "c")) { // Delete, Ctrl-d on Mac
} else if ((code == 46 && !event.shiftKey) || (browser.mac && code == 68 && mods == "c")) { // Delete, Ctrl-d on Mac
return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodes(view, 1)

@@ -284,0 +284,0 @@ } else if (code == 13 || code == 27) { // Enter, Esc

@@ -188,3 +188,3 @@ import {Fragment, DOMParser, ParseRule, Node, Mark, ResolvedPos} from "prosemirror-model"

(!inlineChange || addedNodes.some(n => n.nodeName == "DIV" || n.nodeName == "P"))) ||
(!inlineChange && $from.pos < parse.doc.content.size &&
(!inlineChange && $from.pos < parse.doc.content.size && !$from.sameParent($to) &&
(nextSel = Selection.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) &&

@@ -191,0 +191,0 @@ nextSel.head == $to.pos)) &&

@@ -585,7 +585,8 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state"

target.focus()
let plain = view.input.shiftKey && view.input.lastKeyCode != 45
setTimeout(() => {
view.focus()
if (target.parentNode) target.parentNode.removeChild(target)
if (plainText) doPaste(view, (target as HTMLTextAreaElement).value, null, view.input.shiftKey, event)
else doPaste(view, target.textContent!, target.innerHTML, view.input.shiftKey, event)
if (plainText) doPaste(view, (target as HTMLTextAreaElement).value, null, plain, event)
else doPaste(view, target.textContent!, target.innerHTML, plain, event)
}, 50)

@@ -601,3 +602,3 @@ }

let tr = singleNode
? view.state.tr.replaceSelectionWith(singleNode, view.input.shiftKey)
? view.state.tr.replaceSelectionWith(singleNode, preferPlain)
: view.state.tr.replaceSelection(slice)

@@ -616,3 +617,4 @@ view.dispatch(tr.scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste"))

let data = brokenClipboardAPI ? null : event.clipboardData
if (data && doPaste(view, data.getData("text/plain"), data.getData("text/html"), view.input.shiftKey, event))
let plain = view.input.shiftKey && view.input.lastKeyCode != 45
if (data && doPaste(view, data.getData("text/plain"), data.getData("text/html"), plain, event))
event.preventDefault()

@@ -619,0 +621,0 @@ else

@@ -388,2 +388,14 @@ import {DOMSerializer, Fragment, Mark, Node, ParseRule} from "prosemirror-model"

brKludge = !!(offset && node.nodeValue![offset - 1] == "\n")
// Issue #1128
if (brKludge && offset == node.nodeValue!.length) {
for (let scan: DOMNode | null = node, after; scan; scan = scan.parentNode) {
if (after = scan.nextSibling) {
if (after.nodeName == "BR")
anchorDOM = headDOM = {node: after.parentNode!, offset: domIndex(after) + 1}
break
}
let desc = scan.pmViewDesc
if (desc && desc.node && desc.node.isBlock) break
}
}
} else {

@@ -390,0 +402,0 @@ let prev = node.childNodes[offset - 1]

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

Sorry, the diff of this file is not supported yet

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

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