prosemirror-schema-list
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -0,1 +1,7 @@ | ||
## 1.2.2 (2022-09-09) | ||
### Bug fixes | ||
Fix an issue where `liftListItem` could create adjacent sublists when lifting an item with sub-items. | ||
## 1.2.1 (2022-07-20) | ||
@@ -2,0 +8,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { findWrapping, ReplaceAroundStep, canSplit, liftTarget } from 'prosemirror-transform'; | ||
import { findWrapping, ReplaceAroundStep, canSplit, liftTarget, canJoin } from 'prosemirror-transform'; | ||
import { NodeRange, Fragment, Slice } from 'prosemirror-model'; | ||
@@ -200,3 +200,7 @@ import { Selection } from 'prosemirror-state'; | ||
return false; | ||
dispatch(tr.lift(range, target).scrollIntoView()); | ||
tr.lift(range, target); | ||
let after = tr.mapping.map(end, -1) - 1; | ||
if (canJoin(tr.doc, after)) | ||
tr.join(after); | ||
dispatch(tr.scrollIntoView()); | ||
return true; | ||
@@ -203,0 +207,0 @@ } |
{ | ||
"name": "prosemirror-schema-list", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "List-related schema elements and commands for ProseMirror", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -1,2 +0,2 @@ | ||
import {findWrapping, liftTarget, canSplit, ReplaceAroundStep} from "prosemirror-transform" | ||
import {findWrapping, liftTarget, canSplit, ReplaceAroundStep, canJoin} from "prosemirror-transform" | ||
import {Slice, Fragment, NodeSpec, DOMOutputSpec, NodeType, Attrs, NodeRange} from "prosemirror-model" | ||
@@ -184,3 +184,6 @@ import OrderedMap from "orderedmap" | ||
if (target == null) return false | ||
dispatch(tr.lift(range, target).scrollIntoView()) | ||
tr.lift(range, target) | ||
let after = tr.mapping.map(end, -1) - 1 | ||
if (canJoin(tr.doc, after)) tr.join(after) | ||
dispatch(tr.scrollIntoView()) | ||
return true | ||
@@ -187,0 +190,0 @@ } |
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
46610
11
776