prosemirror-commands
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -0,1 +1,7 @@ | ||
## 1.1.7 (2021-02-22) | ||
### Bug fixes | ||
Fix a regression where `createParagraphNear` no longer fired for gap cursor selections. | ||
## 1.1.6 (2021-02-10) | ||
@@ -2,0 +8,0 @@ |
import { liftTarget, canJoin, joinPoint, canSplit, ReplaceAroundStep, findWrapping } from 'prosemirror-transform'; | ||
import { Fragment, Slice } from 'prosemirror-model'; | ||
import { NodeSelection, Selection, TextSelection, AllSelection } from 'prosemirror-state'; | ||
import { NodeSelection, Selection, AllSelection, TextSelection } from 'prosemirror-state'; | ||
@@ -281,3 +281,3 @@ // :: (EditorState, ?(tr: Transaction)) → bool | ||
var $to = sel.$to; | ||
if (!(sel instanceof NodeSelection) || $from.parent.inlineContent) { return false } | ||
if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) { return false } | ||
var type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter())); | ||
@@ -284,0 +284,0 @@ if (!type || !type.isTextblock) { return false } |
@@ -285,3 +285,3 @@ 'use strict'; | ||
var $to = sel.$to; | ||
if (!(sel instanceof prosemirrorState.NodeSelection) || $from.parent.inlineContent) { return false } | ||
if (sel instanceof prosemirrorState.AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) { return false } | ||
var type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter())); | ||
@@ -288,0 +288,0 @@ if (!type || !type.isTextblock) { return false } |
{ | ||
"name": "prosemirror-commands", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "Editing commands for ProseMirror", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -264,3 +264,3 @@ import {joinPoint, canJoin, findWrapping, liftTarget, canSplit, ReplaceAroundStep} from "prosemirror-transform" | ||
let sel = state.selection, {$from, $to} = sel | ||
if (!(sel instanceof NodeSelection) || $from.parent.inlineContent) return false | ||
if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) return false | ||
let type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter())) | ||
@@ -267,0 +267,0 @@ if (!type || !type.isTextblock) return false |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
202129