- #4945 by @felixfeng33 – Fix empty link normalization when suggestion acceptance removes the last link character
-
- Fixed custom
isUrlhandling so it can reject internal paths like/docsand anchor links like#topinstead of those shortcuts always being accepted.
- Fixed custom
-
- Fixed link validation so text starting with
//is no longer treated as an internal path. This stops comment-style paste content from being autolinked by mistake, including inside code blocks.
- Fixed link validation so text starting with
- #4897 by @zbeyens – Fix declaration bundling by restoring the workspace
platejsbuild edge during package builds
780eb65by @felixfeng33 – Fix link conflict with floating toolbar #4651
-
#4452 by @zbeyens – Fix markdown headings being incorrectly converted to links
The LinkPlugin's
validateUrlfunction now properly distinguishes between markdown headings and anchor links. Previously, any string starting with#was treated as a valid link, causing markdown headings like# heading1to be converted to links when pasted. Now, the function checks for the markdown heading pattern (hash symbols followed by a space) and correctly rejects these as invalid URLs while still allowing valid anchor links like#section-name.
-
- Improved return type of
getLinkAttributesto be more specific and type-safe.
// The function now returns a properly typed object const attributes = getLinkAttributes(editor, linkElement); // attributes is now properly typed as Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target'> & UnknownObject
- Improved return type of
- #4327 by @zbeyens –
- Renamed all
@udecode/plate-*packages to@platejs/*. Replace@udecode/plate-with@platejs/in your code.
- Renamed all
- #4241 by @iamdustan – Fixes #3156: LinkPlugin having a
targetattribute.
- #4073 by @EvanSmith93 – Editor auto focuses when opening the insert link modal
-
#3830 by @felixfeng33 – Move
node.propsplugin attributes from/reactto/ -
#3830 by @felixfeng33 –
- Fix floating link url input being focused when focusing the placeholder input
- #3630 by @natamox – Fixed the problem that the LinkFloatingToolbar disappears when clicking anywhere when inserting a link
847741091a554231db7bd98d4ed1d75557e68a38by @zbeyens – Fix type
- #3609 by @sakshikale14 – Fixed floating link issue #3609
f26ed56053b14e697fea2e6a7e33a73ce28593e4by @12joan – Add thetargetattribute todangerouslyAllowAttributesfor LinkPlugin
8342b6c2f333ee445c8b6be7e864857fd2a2584aby @zbeyens – fix: Potential uncaught error when immediately dismounting the floating link input after update
- #3389 by @georeith – feat:
LinkPluginnew optiontransformInput: (url: string) => string | undefined;that optionally transform's the submitted URL provided by the user to the URL input before validation.
- #3241 by @felixfeng33 – Fix link button closing the floating toolbar.
- #3204 by @jijiseong – Fix zIndex of floating link
- #3036 by @Zum-Gluck – fix #2526,the url and text not cleaned up in time
- #3022 by @Zum-Gluck – Fixes #2526
4cbed7159by @zbeyens – Move@udecode/plate-commonto peerDeps to fix a bug when multiple instances were installed
- #2705 by @AndreyMarchuk – Fix: "Cannot resolve a DOM node from Slate node" floating link case
-
#2585 by @zbeyens –
LinkFloatingToolbar:- soft br:
useVirtualFloatingLinkremovedplacementandmiddlewaredefault values from floating options. - refactor:
useFloatingLinkEditanduseFloatingLinkEditState - refactor:
useFloatingLinkInsertanduseFloatingLinkInsertState - feat:
useFloatingLinkInsertreturn new field:hidden
- soft br:
- #2471 by @zbeyens – Removed:
FloatingLinkFloatingLinkEditButtonFloatingLinkTextInputUnlinkButtonLaunchIconLinkLinkIconLinkOffIconShortTextIcon
-
#2471 by @zbeyens – New hooks:
useLinkuseLinkToolbarButton
-
#2471 by @zbeyens – New exports:
useListToolbarButtonuseTodoListElementsomeList
- #2441 by @vevsindre – Added option to skip link sanitation
- #2405 by @12joan –
- New link plugin option
defaultLinkAttributes?: AnchorHTMLAttributes<HTMLAnchorElement> - Avoid returning
undefinedfromgetLinkAttributes, since this overrides other values
- New link plugin option
- #2296 by @bojangles-m – fix target for new tab
- #2240 by @OliverWales –
- Add
allowedSchemesplugin option- Any URL schemes other than
http(s),mailtoandtelmust be added toallowedSchemes, otherwise they will not be included in links
- Any URL schemes other than
- Add
- #2240 by @OliverWales –
upsertLink:- Removed
isUrl - Added
skipValidation
- Removed
- Check that URL scheme is valid when:
- Upserting links
- Deserializing links from HTL
- Passing
hreftonodeProps - Rendering the
OpenLinkButtoninFloatingLink
- #2225 by @TomMorane – fix: hotkey
- #1829 by @osamatanveer –
- fix import
- #1955 by @zbeyens –
- feat:
LinkPluginnew optionforceSubmit?: boolean. When true and inserting a link,enterkey should submit even when url is invalid - fix: when inserting a link,
enterkey should now submit even another key is pressed - fix: hotkey to trigger floating link (
cmd+kby default) should prevent default
- feat:
- #1892 by @zakishaheen – Wrap valid link in anchor element when inserting a break
- #1865 by @rawi96 –
TLinkElementnew optional proptarget: allows you to control the linktargetattribute. Default isundefined(_blank).
- #1783 by @zbeyens – fix: udecode/editor-protocol#70
- #1765 by @zbeyens – fix:
- overall, marks should be kept on link insert/edit
unwrapLink: new optionsplit- if true: split the link above anchor/focus before unwrapping
upsertLink:- replaced
updateoption byinsertTextInLink: if true, insert text when selection is in url upsertLinkText: If the text is different than the link above text, replace link children by a new text. The new text has the same marks than the first text replaced.
- replaced
- specs:
- #1715 by @tmilewski – Fix FloatingLinkUrlInput snapping to the previous location on show and to the bottom of the editor upon clicking outside of the element
- #1697 by @zbeyens – fix: copy/paste was blocked by the link plugin. Now it should work when the data is not a url and not inserted into a link
- #1677 by @zbeyens –
createLinkPlugin- removed
onKeyDownLinkfor floating link - removed
hotkeyfortriggerFloatingLinkHotkeys
- removed
- removed:
getAndUpsertLinkforupsertLinkupsertLinkAtSelectionforupsertLink
LinkToolbarButton:onClicknow callstriggerFloatingLink
-
- new dep:
@udecode/plate-button
- new unstyled components + props hooks:
PlateFloatingLinkLinkRootFloatingLinkFloatingLinkEditRootFloatingLinkInsertRootFloatingLinkUrlInputFloatingLinkTextInputFloatingLinkEditButtonUnlinkButtonOpenLinkButton
- new store:
floatingLinkStore LinkPluginnew props:triggerFloatingLinkHotkeys: Hotkeys to trigger floating link. Default is 'command+k, ctrl+k'
- new utils:
insertLinksubmitFloatingLinkunwrapLinkupsertLinkcreateLinkNodetriggerFloatingLinktriggerFloatingLinkEdittriggerFloatingLinkInsert
Specs:
- Insert data:
- Insert space:
- Floating link:
- Floating link insert:
- Floating link edit:
- Selection:
- new dep:
- #1687 by @davisg123 – Allow the link plugin to optionally specify a custom href for link text
- #1685 by @davisg123 – Allow the link plugin to optionally specify a custom href for link text
- #1257 by @tjramage –
- fix link upsert on space
getPointBefore: will return early if the point before is in another block. RemovedmultiPathsoption as it's not used anymore.
- Updated dependencies [
a6bf8c5e]:- @udecode/plate-common@5.3.5
- @udecode/plate-normalizers@5.3.5
- Updated dependencies [
8aec270f]:- @udecode/plate-core@5.3.1
- @udecode/plate-common@5.3.1
- @udecode/plate-normalizers@5.3.1
- Updated dependencies [
7ee21356]:- @udecode/plate-core@5.3.0
- @udecode/plate-common@5.3.0
- @udecode/plate-normalizers@5.3.0
- Updated dependencies [
503956fd]:- @udecode/plate-common@5.1.0
- @udecode/plate-normalizers@5.1.0
- Updated dependencies [
b22c06aa]:- @udecode/plate-common@4.4.0
- @udecode/plate-normalizers@4.4.0
- Updated dependencies [
58f6fb53]:- @udecode/plate-core@4.3.7
- @udecode/plate-common@4.3.7
- @udecode/plate-normalizers@4.3.7
- Updated dependencies [
6af469cd]:- @udecode/plate-core@4.3.0
- @udecode/plate-common@4.3.0
- @udecode/plate-normalizers@4.3.0
- #1052
22da824eThanks @aj-foster! - Add keyboard shortcut for inserting a link at the current selection
- #1041
7ab01674Thanks @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.
- Updated dependencies [
f1da7267,35caf35d]:- @udecode/plate-common@3.4.0
- @udecode/plate-core@3.4.0
- @udecode/plate-normalizers@3.4.0
- Updated dependencies [
58387c6d]:- @udecode/plate-common@3.2.0
- @udecode/plate-core@3.2.0
- @udecode/plate-normalizers@3.2.0
- Updated dependencies [
f6c58134]:- @udecode/plate-common@3.1.3
- @udecode/plate-normalizers@3.1.3
- Updated dependencies [
ec4d5b7b]:- @udecode/plate-common@2.0.0
- @udecode/plate-normalizers@2.0.0
-
#918
7d045d8dThanks @zbeyens! - addslate-historyas a peerDep -
Updated dependencies [
7d045d8d]:- @udecode/plate-common@1.1.6
- @udecode/plate-normalizers@1.1.6
🎉 The Slate Plugins project has evolved to Plate 🎉
To migrate, install @udecode/plate[-x] then find and replace all
occurrences of:
slate-pluginstoplateSlatePluginstoPlateSlatePlugintoPlatePlugin
This is the last version of
@udecode/slate-plugins[-x], please install@udecode/plate[-x].
- Updated dependencies [
7c26cf32]:- @udecode/slate-plugins-core@1.0.0-next.61
- @udecode/slate-plugins-common@1.0.0-next.61
- @udecode/slate-plugins-normalizers@1.0.0-next.61
- Updated dependencies [
3a3eb1b8]:- @udecode/slate-plugins-common@1.0.0-next.59
- @udecode/slate-plugins-normalizers@1.0.0-next.59
- Updated dependencies [
75b39f18]:- @udecode/slate-plugins-core@1.0.0-next.56
- @udecode/slate-plugins-common@1.0.0-next.56
- @udecode/slate-plugins-normalizers@1.0.0-next.56
- Updated dependencies [
abaf4a11]:- @udecode/slate-plugins-core@1.0.0-next.55
- @udecode/slate-plugins-common@1.0.0-next.55
- @udecode/slate-plugins-normalizers@1.0.0-next.55
- Updated dependencies [
d906095d]:- @udecode/slate-plugins-common@1.0.0-next.54
- @udecode/slate-plugins-normalizers@1.0.0-next.54
- Updated dependencies [
42360b44]:- @udecode/slate-plugins-core@1.0.0-next.53
- @udecode/slate-plugins-common@1.0.0-next.53
- @udecode/slate-plugins-normalizers@1.0.0-next.53
- Updated dependencies [
6e9068f6]:- @udecode/slate-plugins-common@1.0.0-next.46
- @udecode/slate-plugins-normalizers@1.0.0-next.46
- Updated dependencies [
15048e6f]:- @udecode/slate-plugins-core@1.0.0-next.40
- @udecode/slate-plugins-common@1.0.0-next.40
- @udecode/slate-plugins-normalizers@1.0.0-next.40
- Updated dependencies [
b444071e]:- @udecode/slate-plugins-core@1.0.0-next.39
- @udecode/slate-plugins-common@1.0.0-next.39
- @udecode/slate-plugins-normalizers@1.0.0-next.39
- Updated dependencies [
2cf618c3]:- @udecode/slate-plugins-common@1.0.0-next.37
- @udecode/slate-plugins-normalizers@1.0.0-next.37
- Updated dependencies [
7cbd7bd9,806e1632]:- @udecode/slate-plugins-common@1.0.0-next.36
- @udecode/slate-plugins-core@1.0.0-next.36
- @udecode/slate-plugins-normalizers@1.0.0-next.36
- Updated dependencies [
33605a49,28f30c8a,75e6d25d]:- @udecode/slate-plugins-core@1.0.0-next.30
- @udecode/slate-plugins-common@1.0.0-next.30
- @udecode/slate-plugins-normalizers@1.0.0-next.30
- Updated dependencies [
dfbde8bd,dfbde8bd]:- @udecode/slate-plugins-core@1.0.0-next.29
- @udecode/slate-plugins-common@1.0.0-next.29
- @udecode/slate-plugins-normalizers@1.0.0-next.29
- Updated dependencies [
201a7993]:- @udecode/slate-plugins-core@1.0.0-next.26
- @udecode/slate-plugins-common@1.0.0-next.26
- @udecode/slate-plugins-normalizers@1.0.0-next.26