prosemirror-commands
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -0,1 +1,7 @@ | ||
## 1.1.8 (2021-05-22) | ||
### Bug fixes | ||
Fix a crash in `splitBlock` that occurred with certain types of schemas. | ||
## 1.1.7 (2021-02-22) | ||
@@ -2,0 +8,0 @@ |
@@ -341,5 +341,7 @@ import { liftTarget, canJoin, joinPoint, canSplit, ReplaceAroundStep, findWrapping } from 'prosemirror-transform'; | ||
tr.split(tr.mapping.map($from.pos), 1, types); | ||
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt && | ||
$from.node(-1).canReplace($from.index(-1), $from.indexAfter(-1), Fragment.from([deflt.create(), $from.parent]))) | ||
{ tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); } | ||
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt) { | ||
var first = tr.mapping.map($from.before()), $first = tr.doc.resolve(first); | ||
if ($from.parent.canReplaceWith($first.index(), $first.index() + 1, deflt)) | ||
{ tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); } | ||
} | ||
} | ||
@@ -346,0 +348,0 @@ dispatch(tr.scrollIntoView()); |
@@ -345,5 +345,7 @@ 'use strict'; | ||
tr.split(tr.mapping.map($from.pos), 1, types); | ||
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt && | ||
$from.node(-1).canReplace($from.index(-1), $from.indexAfter(-1), prosemirrorModel.Fragment.from([deflt.create(), $from.parent]))) | ||
{ tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); } | ||
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt) { | ||
var first = tr.mapping.map($from.before()), $first = tr.doc.resolve(first); | ||
if ($from.parent.canReplaceWith($first.index(), $first.index() + 1, deflt)) | ||
{ tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); } | ||
} | ||
} | ||
@@ -350,0 +352,0 @@ dispatch(tr.scrollIntoView()); |
{ | ||
"name": "prosemirror-commands", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Editing commands for ProseMirror", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -321,5 +321,7 @@ import {joinPoint, canJoin, findWrapping, liftTarget, canSplit, ReplaceAroundStep} from "prosemirror-transform" | ||
tr.split(tr.mapping.map($from.pos), 1, types) | ||
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt && | ||
$from.node(-1).canReplace($from.index(-1), $from.indexAfter(-1), Fragment.from([deflt.create(), $from.parent]))) | ||
tr.setNodeMarkup(tr.mapping.map($from.before()), deflt) | ||
if (!atEnd && !$from.parentOffset && $from.parent.type != deflt) { | ||
let first = tr.mapping.map($from.before()), $first = tr.doc.resolve(first) | ||
if ($from.parent.canReplaceWith($first.index(), $first.index() + 1, deflt)) | ||
tr.setNodeMarkup(tr.mapping.map($from.before()), deflt) | ||
} | ||
} | ||
@@ -326,0 +328,0 @@ dispatch(tr.scrollIntoView()) |
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
202592
1868