mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-23 17:07:49 +08:00
10 lines
338 B
TypeScript
10 lines
338 B
TypeScript
import { EditorState } from 'prosemirror-state'
|
|
import { MarkType } from 'prosemirror-model'
|
|
import getMarkAttrs from './getMarkAttrs'
|
|
|
|
export default function markHasAttributes(state: EditorState, type: MarkType, attrs?: Object) {
|
|
return attrs === null || JSON.stringify(attrs) === JSON.stringify(
|
|
getMarkAttrs(state, type),
|
|
)
|
|
}
|