add new commands to all extensions

This commit is contained in:
Philipp Kühn
2018-10-28 21:59:08 +01:00
parent d2519c2953
commit dcba6686dc
16 changed files with 37 additions and 38 deletions

View File

@@ -30,12 +30,14 @@ export default class Link extends Mark {
}
}
command({ type, attrs }) {
if (attrs.href) {
return updateMark(type, attrs)
}
commands({ type }) {
return attrs => {
if (attrs.href) {
return updateMark(type, attrs)
}
return removeMark(type)
return removeMark(type)
}
}
}