@tiptap/extension-image
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-image@2.0.0-beta.6...@tiptap/extension-image@2.0.0-beta.7) (2021-05-05) | ||
**Note:** Version bump only for package @tiptap/extension-image | ||
# [2.0.0-beta.6](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-image@2.0.0-beta.5...@tiptap/extension-image@2.0.0-beta.6) (2021-04-23) | ||
@@ -8,0 +16,0 @@ |
@@ -46,9 +46,7 @@ 'use strict'; | ||
return { | ||
setImage: options => ({ tr, dispatch }) => { | ||
const { selection } = tr; | ||
const node = this.type.create(options); | ||
if (dispatch) { | ||
tr.replaceRangeWith(selection.from, selection.to, node); | ||
} | ||
return true; | ||
setImage: options => ({ commands }) => { | ||
return commands.insertContent({ | ||
type: this.name, | ||
attrs: options, | ||
}); | ||
}, | ||
@@ -55,0 +53,0 @@ }; |
@@ -42,9 +42,7 @@ import { Node, mergeAttributes, nodeInputRule } from '@tiptap/core'; | ||
return { | ||
setImage: options => ({ tr, dispatch }) => { | ||
const { selection } = tr; | ||
const node = this.type.create(options); | ||
if (dispatch) { | ||
tr.replaceRangeWith(selection.from, selection.to, node); | ||
} | ||
return true; | ||
setImage: options => ({ commands }) => { | ||
return commands.insertContent({ | ||
type: this.name, | ||
attrs: options, | ||
}); | ||
}, | ||
@@ -51,0 +49,0 @@ }; |
@@ -46,9 +46,7 @@ (function (global, factory) { | ||
return { | ||
setImage: options => ({ tr, dispatch }) => { | ||
const { selection } = tr; | ||
const node = this.type.create(options); | ||
if (dispatch) { | ||
tr.replaceRangeWith(selection.from, selection.to, node); | ||
} | ||
return true; | ||
setImage: options => ({ commands }) => { | ||
return commands.insertContent({ | ||
type: this.name, | ||
attrs: options, | ||
}); | ||
}, | ||
@@ -55,0 +53,0 @@ }; |
MIT License | ||
Copyright (c) 2020, überdosis GbR | ||
Copyright (c) 2021, überdosis GbR | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
{ | ||
"name": "@tiptap/extension-image", | ||
"description": "image extension for tiptap", | ||
"version": "2.0.0-beta.6", | ||
"version": "2.0.0-beta.7", | ||
"homepage": "https://tiptap.dev", | ||
@@ -18,3 +18,2 @@ "keywords": [ | ||
"module": "dist/tiptap-extension-image.esm.js", | ||
"unpkg": "dist/tiptap-extension-image.bundle.umd.min.js", | ||
"types": "dist/packages/extension-image/src/index.d.ts", | ||
@@ -28,3 +27,3 @@ "files": [ | ||
}, | ||
"gitHead": "bd9e15d78f9159afb05d09e7ba279ff7d74a85ea" | ||
"gitHead": "c64520b74dab6b127c78960c1bd0af237b1f68fb" | ||
} |
@@ -72,11 +72,7 @@ import { | ||
return { | ||
setImage: options => ({ tr, dispatch }) => { | ||
const { selection } = tr | ||
const node = this.type.create(options) | ||
if (dispatch) { | ||
tr.replaceRangeWith(selection.from, selection.to, node) | ||
} | ||
return true | ||
setImage: options => ({ commands }) => { | ||
return commands.insertContent({ | ||
type: this.name, | ||
attrs: options, | ||
}) | ||
}, | ||
@@ -83,0 +79,0 @@ } |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
23541
14
293