fix calculating mark range for unsetMark command
This commit is contained in:
@@ -34,7 +34,8 @@ export const unsetMark: RawCommands['unsetMark'] = (typeOrName, options = {}) =>
|
|||||||
|
|
||||||
if (empty && extendEmptyMarkRange) {
|
if (empty && extendEmptyMarkRange) {
|
||||||
let { from, to } = selection
|
let { from, to } = selection
|
||||||
const range = getMarkRange($from, type)
|
const attrs = selection.$from.marks().find(mark => mark.type === type)?.attrs
|
||||||
|
const range = getMarkRange($from, type, attrs)
|
||||||
|
|
||||||
if (range) {
|
if (range) {
|
||||||
from = range.from
|
from = range.from
|
||||||
|
|||||||
Reference in New Issue
Block a user