add commands and utils packages

This commit is contained in:
Philipp Kühn
2018-08-23 10:33:49 +02:00
parent 14cb2ef085
commit d5039489dd
12 changed files with 8354 additions and 24 deletions

View File

@@ -0,0 +1,14 @@
export default function (state, type) {
const {
from,
$from,
to,
empty,
} = state.selection
if (empty) {
return !!type.isInSet(state.storedMarks || $from.marks())
}
return !!state.doc.rangeHasMark(from, to, type)
}