@udecode/plate-link
Advanced tools
Comparing version 3.4.0 to 3.5.0
# @udecode/plate-link | ||
## 3.5.0 | ||
### Minor Changes | ||
- [#1041](https://github.com/udecode/plate/pull/1041) [`7ab01674`](https://github.com/udecode/plate/commit/7ab016745c5eddcf4daa73bbc1958f087d0c4b90) Thanks [@aj-foster](https://github.com/aj-foster)! - feat(link): Unwrap selected links when pasting a URL. Previously, pasting any text (including a URL) with an existing link selected would insert plain text. With this change, pasting a URL will unwrap any selected links and wrap a new link. | ||
## 3.4.0 | ||
@@ -4,0 +10,0 @@ |
@@ -185,2 +185,8 @@ import { getPlatePluginOptions, getPlatePluginType, getRenderElement, getPlatePluginTypes } from '@udecode/plate-core'; | ||
if (text) { | ||
if (isUrl$1(text)) { | ||
return upsertLinkAtSelection(editor, { | ||
url: text | ||
}); | ||
} | ||
if (someNode(editor, { | ||
@@ -193,8 +199,2 @@ match: { | ||
} | ||
if (isUrl$1(text)) { | ||
return upsertLinkAtSelection(editor, { | ||
url: text | ||
}); | ||
} | ||
} | ||
@@ -201,0 +201,0 @@ |
@@ -189,2 +189,8 @@ 'use strict'; | ||
if (text) { | ||
if (isUrl(text)) { | ||
return upsertLinkAtSelection(editor, { | ||
url: text | ||
}); | ||
} | ||
if (plateCommon.someNode(editor, { | ||
@@ -197,8 +203,2 @@ match: { | ||
} | ||
if (isUrl(text)) { | ||
return upsertLinkAtSelection(editor, { | ||
url: text | ||
}); | ||
} | ||
} | ||
@@ -205,0 +205,0 @@ |
{ | ||
"name": "@udecode/plate-link", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "Link plugin for Plate", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
50104