tiptap-commands
Advanced tools
Comparing version 1.13.1 to 1.14.0
{ | ||
"name": "tiptap-commands", | ||
"version": "1.13.1", | ||
"version": "1.14.0", | ||
"description": "Commands for tiptap", | ||
@@ -23,12 +23,12 @@ "homepage": "https://tiptap.scrumpy.io", | ||
"dependencies": { | ||
"prosemirror-commands": "1.1.4", | ||
"prosemirror-inputrules": "1.1.2", | ||
"prosemirror-model": "1.9.1", | ||
"prosemirror-schema-list": "1.1.2", | ||
"prosemirror-state": "1.3.3", | ||
"prosemirror-tables": "1.0.0", | ||
"prosemirror-utils": "0.9.6", | ||
"tiptap-utils": "^1.9.1" | ||
"prosemirror-commands": "^1.1.4", | ||
"prosemirror-inputrules": "^1.1.2", | ||
"prosemirror-model": "^1.10.0", | ||
"prosemirror-schema-list": "^1.1.2", | ||
"prosemirror-state": "^1.3.3", | ||
"prosemirror-tables": "^1.1.0", | ||
"prosemirror-utils": "^0.9.6", | ||
"tiptap-utils": "^1.10.0" | ||
}, | ||
"gitHead": "92eb2c61ccf2780c51212724fd879ba343436bd3" | ||
"gitHead": "71409c1c811ce75b20a28225c78b0ef9caae1f1b" | ||
} |
@@ -19,3 +19,3 @@ import { Plugin } from 'prosemirror-state' | ||
while (!isLink && (match = regexp.exec(text)) !== null) { | ||
if (parent.type.allowsMarkType(type) && match[1]) { | ||
if (parent && parent.type.allowsMarkType(type) && match[1]) { | ||
const start = match.index | ||
@@ -22,0 +22,0 @@ const end = start + match[0].length |
import { wrapIn, lift } from 'prosemirror-commands' | ||
import { nodeIsActive } from 'tiptap-utils' | ||
export default function (type) { | ||
export default function (type, attrs = {}) { | ||
return (state, dispatch, view) => { | ||
const isActive = nodeIsActive(state, type) | ||
const isActive = nodeIsActive(state, type, attrs) | ||
@@ -12,4 +12,4 @@ if (isActive) { | ||
return wrapIn(type)(state, dispatch, view) | ||
return wrapIn(type, attrs)(state, dispatch, view) | ||
} | ||
} |
85064
+ Addedprosemirror-commands@1.6.2(transitive)
+ Addedprosemirror-inputrules@1.4.0(transitive)
+ Addedprosemirror-schema-list@1.5.0(transitive)
- Removedorderedmap@1.1.8(transitive)
- Removedprosemirror-commands@1.1.4(transitive)
- Removedprosemirror-inputrules@1.1.2(transitive)
- Removedprosemirror-model@1.9.1(transitive)
- Removedprosemirror-schema-list@1.1.2(transitive)
- Removedprosemirror-state@1.3.3(transitive)
- Removedprosemirror-tables@1.0.0(transitive)
Updatedprosemirror-commands@^1.1.4
Updatedprosemirror-model@^1.10.0
Updatedprosemirror-state@^1.3.3
Updatedprosemirror-tables@^1.1.0
Updatedprosemirror-utils@^0.9.6
Updatedtiptap-utils@^1.10.0