mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 09:29:49 +02:00
remove unused method
This commit is contained in:
@@ -474,28 +474,6 @@ class State extends StateRecord {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove characters from a node by `key` between offsets.
|
|
||||||
*
|
|
||||||
* @param {String} key
|
|
||||||
* @param {Number} startOffset
|
|
||||||
* @param {Number} endOffset
|
|
||||||
* @return {State} state
|
|
||||||
*/
|
|
||||||
|
|
||||||
removeCharacters(key, startOffset, endOffset) {
|
|
||||||
let state = this
|
|
||||||
let node = state.getNode(key)
|
|
||||||
|
|
||||||
const characters = node.characters.filterNot((char, i) => {
|
|
||||||
return startOffset <= i && i < endOffset
|
|
||||||
})
|
|
||||||
|
|
||||||
node = node.merge({ characters })
|
|
||||||
state = state.updateNode(node)
|
|
||||||
return state
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Split at a `selection`.
|
* Split at a `selection`.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user