mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 18:39:51 +02:00
fixes
This commit is contained in:
@@ -142,11 +142,21 @@ class Images extends React.Component {
|
||||
|
||||
if (anchorBlock.text != '') {
|
||||
if (selection.isAtEndOf(anchorBlock)) {
|
||||
transform = transform.splitBlock()
|
||||
} else if (selection.isAtStartOf(anchorBlock)) {
|
||||
transform = transform.splitBlock().moveToStartOfPreviousBlock()
|
||||
} else {
|
||||
transform = transform.splitBlock().splitBlock().moveToStartOfPreviousBlock()
|
||||
transform = transform
|
||||
.splitBlock()
|
||||
}
|
||||
|
||||
else if (selection.isAtStartOf(anchorBlock)) {
|
||||
transform = transform
|
||||
.splitBlock()
|
||||
.collapseToStartOfPreviousBlock()
|
||||
}
|
||||
|
||||
else {
|
||||
transform = transform
|
||||
.splitBlock()
|
||||
.splitBlock()
|
||||
.collapseToStartOfPreviousBlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user