rename some methods

This commit is contained in:
Philipp Kühn
2020-11-17 21:10:08 +01:00
parent 99aebcc18b
commit a4ad1572e8
9 changed files with 18 additions and 18 deletions

View File

@@ -1,13 +1,13 @@
import { MarkType } from 'prosemirror-model'
import { Command } from '../types'
import getMarkType from '../utils/getMarkType'
import getMarkAttrs from '../utils/getMarkAttrs'
import getMarkAttributes from '../utils/getMarkAttributes'
export default (typeOrName: string | MarkType, attributes: {}): Command => ({ tr, state, dispatch }) => {
const { selection } = tr
const { from, to, empty } = selection
const type = getMarkType(typeOrName, state.schema)
const oldAttributes = getMarkAttrs(state, type)
const oldAttributes = getMarkAttributes(state, type)
const newAttributes = {
...oldAttributes,
...attributes,