@tiptap/extension-task-item
Advanced tools
Comparing version 2.0.0-beta.6 to 2.0.0-beta.7
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-beta.7](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-item@2.0.0-beta.6...@tiptap/extension-task-item@2.0.0-beta.7) (2021-04-23) | ||
**Note:** Version bump only for package @tiptap/extension-task-item | ||
# [2.0.0-beta.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-item@2.0.0-beta.5...@tiptap/extension-task-item@2.0.0-beta.6) (2021-04-22) | ||
@@ -8,0 +16,0 @@ |
@@ -59,3 +59,2 @@ 'use strict'; | ||
return ({ node, HTMLAttributes, getPos, editor, }) => { | ||
const { view } = editor; | ||
const listItem = document.createElement('li'); | ||
@@ -71,6 +70,12 @@ const checkboxWrapper = document.createElement('label'); | ||
if (typeof getPos === 'function') { | ||
view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
})); | ||
editor.commands.focus(); | ||
editor | ||
.chain() | ||
.focus() | ||
.command(({ tr }) => { | ||
tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
}); | ||
return true; | ||
}) | ||
.run(); | ||
} | ||
@@ -77,0 +82,0 @@ }); |
@@ -55,3 +55,2 @@ import { Node, mergeAttributes } from '@tiptap/core'; | ||
return ({ node, HTMLAttributes, getPos, editor, }) => { | ||
const { view } = editor; | ||
const listItem = document.createElement('li'); | ||
@@ -67,6 +66,12 @@ const checkboxWrapper = document.createElement('label'); | ||
if (typeof getPos === 'function') { | ||
view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
})); | ||
editor.commands.focus(); | ||
editor | ||
.chain() | ||
.focus() | ||
.command(({ tr }) => { | ||
tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
}); | ||
return true; | ||
}) | ||
.run(); | ||
} | ||
@@ -73,0 +78,0 @@ }); |
@@ -58,3 +58,2 @@ (function (global, factory) { | ||
return ({ node, HTMLAttributes, getPos, editor, }) => { | ||
const { view } = editor; | ||
const listItem = document.createElement('li'); | ||
@@ -70,6 +69,12 @@ const checkboxWrapper = document.createElement('label'); | ||
if (typeof getPos === 'function') { | ||
view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
})); | ||
editor.commands.focus(); | ||
editor | ||
.chain() | ||
.focus() | ||
.command(({ tr }) => { | ||
tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
}); | ||
return true; | ||
}) | ||
.run(); | ||
} | ||
@@ -76,0 +81,0 @@ }); |
{ | ||
"name": "@tiptap/extension-task-item", | ||
"description": "task item extension for tiptap", | ||
"version": "2.0.0-beta.6", | ||
"version": "2.0.0-beta.7", | ||
"homepage": "https://tiptap.dev", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "4b68a369a17269063b007008f7c5cba2f83f1f2c" | ||
"gitHead": "20f870dc9d1f28306e5c0446dd3b9cc154f38922" | ||
} |
@@ -80,3 +80,2 @@ import { Node, mergeAttributes } from '@tiptap/core' | ||
}) => { | ||
const { view } = editor | ||
const listItem = document.createElement('li') | ||
@@ -94,6 +93,13 @@ const checkboxWrapper = document.createElement('label') | ||
if (typeof getPos === 'function') { | ||
view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
})) | ||
editor.commands.focus() | ||
editor | ||
.chain() | ||
.focus() | ||
.command(({ tr }) => { | ||
tr.setNodeMarkup(getPos(), undefined, { | ||
checked, | ||
}) | ||
return true | ||
}) | ||
.run() | ||
} | ||
@@ -100,0 +106,0 @@ }) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
488314
823