mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-22 00:55:24 +08:00
add nodeEqualsType util
This commit is contained in:
parent
f13e767518
commit
6049b5a318
@ -1,4 +1,5 @@
|
|||||||
export { default as getMarkAttrs } from './utils/getMarkAttrs'
|
export { default as getMarkAttrs } from './utils/getMarkAttrs'
|
||||||
export { default as getMarkRange } from './utils/getMarkRange'
|
export { default as getMarkRange } from './utils/getMarkRange'
|
||||||
export { default as markIsActive } from './utils/markIsActive'
|
export { default as markIsActive } from './utils/markIsActive'
|
||||||
|
export { default as nodeEqualsType } from './utils/nodeEqualsType'
|
||||||
export { default as nodeIsActive } from './utils/nodeIsActive'
|
export { default as nodeIsActive } from './utils/nodeIsActive'
|
||||||
|
3
packages/tiptap-utils/src/utils/nodeEqualsType.js
Normal file
3
packages/tiptap-utils/src/utils/nodeEqualsType.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default function nodeEqualsType({ types, node }) {
|
||||||
|
return (Array.isArray(types) && types.includes(node.type)) || node.type === types
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user