tiptap/packages/tiptap-commands/src/commands/removeMark.js

7 lines
169 B
JavaScript
Raw Normal View History

2018-08-23 16:33:49 +08:00
export default function (type) {
return (state, dispatch) => {
2018-11-09 05:03:10 +08:00
const { from, to } = state.selection
return dispatch(state.tr.removeMark(from, to, type))
}
2018-08-23 16:33:49 +08:00
}