diff --git a/.changeset/funny-eyes-begin.md b/.changeset/funny-eyes-begin.md deleted file mode 100644 index 41ac2a719c..0000000000 --- a/.changeset/funny-eyes-begin.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@platejs/core': patch ---- - -Expose mimeType to plugin parser functions - -Added comprehensive copy functionality and view editor support for static rendering. - -**New Components:** -- Added `PlateView` component for static editor rendering with copy support -- Added `usePlateViewEditor` hook for creating memoized static editors - -**Static Editor Enhancements:** -- Added `withStatic` HOC to enhance editors with static rendering capabilities -- Added `ViewPlugin` that enables copy operations in static editors -- Added `getStaticPlugins` to configure plugins for static rendering -- Added `onCopy` handler that properly serializes content with `x-slate-fragment` format - -**New Utilities:** -- Added `getSelectedDomBlocks` to extract selected DOM elements with Slate metadata -- Added `getSelectedDomNode` to get DOM nodes from browser selection -- Added `isSelectOutside` to check if selection is outside editor bounds -- Added `getPlainText` to recursively extract plain text from DOM nodes - -This enables seamless copy operations from static Plate editors, allowing content to be pasted into other Slate editors while preserving rich formatting and structure. diff --git a/.changeset/platejs-core-minor.md b/.changeset/platejs-core-minor.md deleted file mode 100644 index 2f5f218880..0000000000 --- a/.changeset/platejs-core-minor.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'@platejs/core': patch ---- - -Added comprehensive copy functionality and view editor support for static rendering. - -**New Components:** - -- Added `PlateView` component for static editor rendering with copy support -- Added `usePlateViewEditor` hook for creating memoized static editors - -**Static Editor Enhancements:** - -- Added `withStatic` HOC to enhance editors with static rendering capabilities -- Added `ViewPlugin` that enables copy operations in static editors -- Added `getStaticPlugins` to configure plugins for static rendering -- Added `onCopy` handler that properly serializes content with `x-slate-fragment` format - -**New Utilities:** - -- Added `getSelectedDomBlocks` to extract selected DOM elements with Slate metadata -- Added `getSelectedDomNode` to get DOM nodes from browser selection -- Added `isSelectOutside` to check if selection is outside editor bounds -- Added `getPlainText` to recursively extract plain text from DOM nodes - -This enables seamless copy operations from static Plate editors, allowing content to be pasted into other Slate editors while preserving rich formatting and structure. diff --git a/packages/autoformat/package.json b/packages/autoformat/package.json index 29f59c1a33..851b692a1b 100644 --- a/packages/autoformat/package.json +++ b/packages/autoformat/package.json @@ -50,7 +50,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/basic-nodes/package.json b/packages/basic-nodes/package.json index 87aca61155..058c574d88 100644 --- a/packages/basic-nodes/package.json +++ b/packages/basic-nodes/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/basic-styles/package.json b/packages/basic-styles/package.json index 50c6289529..9649ec3528 100644 --- a/packages/basic-styles/package.json +++ b/packages/basic-styles/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/callout/package.json b/packages/callout/package.json index 0cea2d4b66..afb42921dc 100644 --- a/packages/callout/package.json +++ b/packages/callout/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/caption/package.json b/packages/caption/package.json index 412f0508e6..43ba2c67f9 100644 --- a/packages/caption/package.json +++ b/packages/caption/package.json @@ -55,7 +55,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/code-block/package.json b/packages/code-block/package.json index 7eb5a88925..f67a895867 100644 --- a/packages/code-block/package.json +++ b/packages/code-block/package.json @@ -54,7 +54,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/combobox/package.json b/packages/combobox/package.json index b1fe8c9671..f009a8b890 100644 --- a/packages/combobox/package.json +++ b/packages/combobox/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/comment/package.json b/packages/comment/package.json index 961c90573d..2e3f148525 100644 --- a/packages/comment/package.json +++ b/packages/comment/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 3b76bb6e1d..cb7dac24dc 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,57 @@ # @platejs/core +## 49.0.16 + +### Patch Changes + +- [#4441](https://github.com/udecode/plate/pull/4441) by [@delijah](https://github.com/delijah) – Expose mimeType to plugin parser functions + + Added comprehensive copy functionality and view editor support for static rendering. + + **New Components:** + + - Added `PlateView` component for static editor rendering with copy support + - Added `usePlateViewEditor` hook for creating memoized static editors + + **Static Editor Enhancements:** + + - Added `withStatic` HOC to enhance editors with static rendering capabilities + - Added `ViewPlugin` that enables copy operations in static editors + - Added `getStaticPlugins` to configure plugins for static rendering + - Added `onCopy` handler that properly serializes content with `x-slate-fragment` format + + **New Utilities:** + + - Added `getSelectedDomBlocks` to extract selected DOM elements with Slate metadata + - Added `getSelectedDomNode` to get DOM nodes from browser selection + - Added `isSelectOutside` to check if selection is outside editor bounds + - Added `getPlainText` to recursively extract plain text from DOM nodes + + This enables seamless copy operations from static Plate editors, allowing content to be pasted into other Slate editors while preserving rich formatting and structure. + +- [`a6c3e52`](https://github.com/udecode/plate/commit/a6c3e521c2cd8410d151f0b99a9080bba171b276) by [@felixfeng33](https://github.com/felixfeng33) – Added comprehensive copy functionality and view editor support for static rendering. + + **New Components:** + + - Added `PlateView` component for static editor rendering with copy support + - Added `usePlateViewEditor` hook for creating memoized static editors + + **Static Editor Enhancements:** + + - Added `withStatic` HOC to enhance editors with static rendering capabilities + - Added `ViewPlugin` that enables copy operations in static editors + - Added `getStaticPlugins` to configure plugins for static rendering + - Added `onCopy` handler that properly serializes content with `x-slate-fragment` format + + **New Utilities:** + + - Added `getSelectedDomBlocks` to extract selected DOM elements with Slate metadata + - Added `getSelectedDomNode` to get DOM nodes from browser selection + - Added `isSelectOutside` to check if selection is outside editor bounds + - Added `getPlainText` to recursively extract plain text from DOM nodes + + This enables seamless copy operations from static Plate editors, allowing content to be pasted into other Slate editors while preserving rich formatting and structure. + ## 49.0.15 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 68d50b5e8d..35e1751d23 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@platejs/core", - "version": "49.0.15", + "version": "49.0.16", "description": "The core of Plate – a plugin system for slate", "keywords": [ "contentEditable", diff --git a/packages/csv/package.json b/packages/csv/package.json index 1086461419..f16943545d 100644 --- a/packages/csv/package.json +++ b/packages/csv/package.json @@ -54,7 +54,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/cursor/package.json b/packages/cursor/package.json index 82b21ae2e7..8cd3360bf0 100644 --- a/packages/cursor/package.json +++ b/packages/cursor/package.json @@ -47,7 +47,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/date/package.json b/packages/date/package.json index fb14441887..0412f5f712 100644 --- a/packages/date/package.json +++ b/packages/date/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/diff/package.json b/packages/diff/package.json index 15b7b93dc2..351f76e0b1 100644 --- a/packages/diff/package.json +++ b/packages/diff/package.json @@ -50,7 +50,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/dnd/package.json b/packages/dnd/package.json index a09eb4be52..70a560c597 100644 --- a/packages/dnd/package.json +++ b/packages/dnd/package.json @@ -51,7 +51,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dnd": ">=14.0.0", "react-dnd-html5-backend": ">=14.0.0", diff --git a/packages/docx/package.json b/packages/docx/package.json index 70cd872048..a2fbf0586c 100644 --- a/packages/docx/package.json +++ b/packages/docx/package.json @@ -52,7 +52,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/emoji/package.json b/packages/emoji/package.json index bda5170296..b2ae8919d7 100644 --- a/packages/emoji/package.json +++ b/packages/emoji/package.json @@ -58,7 +58,7 @@ }, "peerDependencies": { "@emoji-mart/data": ">=1.2.0", - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/excalidraw/package.json b/packages/excalidraw/package.json index 69fce3aa26..ce370bd477 100644 --- a/packages/excalidraw/package.json +++ b/packages/excalidraw/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/find-replace/package.json b/packages/find-replace/package.json index 32efdc3b4f..a4e757cd84 100644 --- a/packages/find-replace/package.json +++ b/packages/find-replace/package.json @@ -47,7 +47,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/floating/package.json b/packages/floating/package.json index 101998c832..9725343d48 100644 --- a/packages/floating/package.json +++ b/packages/floating/package.json @@ -51,7 +51,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/indent/package.json b/packages/indent/package.json index 23ee71f698..d5131bf138 100644 --- a/packages/indent/package.json +++ b/packages/indent/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/juice/package.json b/packages/juice/package.json index 2d5a075893..f966fd2057 100644 --- a/packages/juice/package.json +++ b/packages/juice/package.json @@ -50,7 +50,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/layout/package.json b/packages/layout/package.json index cac9ad0792..4a07f0a09d 100644 --- a/packages/layout/package.json +++ b/packages/layout/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/link/package.json b/packages/link/package.json index 67e595f6d1..dafb82ed80 100644 --- a/packages/link/package.json +++ b/packages/link/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/list-classic/package.json b/packages/list-classic/package.json index c34f8cb761..c6f49da499 100644 --- a/packages/list-classic/package.json +++ b/packages/list-classic/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/list/package.json b/packages/list/package.json index 676743c72c..b8b0198eac 100644 --- a/packages/list/package.json +++ b/packages/list/package.json @@ -57,7 +57,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/markdown/package.json b/packages/markdown/package.json index ce0caa482c..ed241dc234 100644 --- a/packages/markdown/package.json +++ b/packages/markdown/package.json @@ -62,7 +62,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/math/package.json b/packages/math/package.json index 7f530b37ec..b4583d9e1f 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -57,7 +57,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/media/package.json b/packages/media/package.json index cfae8ae000..7fa5657dcb 100644 --- a/packages/media/package.json +++ b/packages/media/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/mention/package.json b/packages/mention/package.json index c2daed3d9d..967a1456f1 100644 --- a/packages/mention/package.json +++ b/packages/mention/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/plate/CHANGELOG.md b/packages/plate/CHANGELOG.md index d001d2ae0a..5eb4afc4a7 100644 --- a/packages/plate/CHANGELOG.md +++ b/packages/plate/CHANGELOG.md @@ -1,5 +1,7 @@ # platejs +## 49.0.16 + ## 49.0.15 ## 49.0.14 diff --git a/packages/plate/package.json b/packages/plate/package.json index 715f03f59f..98fecb88f3 100644 --- a/packages/plate/package.json +++ b/packages/plate/package.json @@ -1,6 +1,6 @@ { "name": "platejs", - "version": "49.0.15", + "version": "49.0.16", "description": "Plate – a framework for building rich text editors on the web", "keywords": [ "contentEditable", @@ -56,9 +56,9 @@ "typecheck": "yarn p:typecheck" }, "dependencies": { - "@platejs/core": "49.0.15", + "@platejs/core": "49.0.16", "@platejs/slate": "49.0.2", - "@platejs/utils": "49.0.15", + "@platejs/utils": "49.0.16", "@udecode/react-hotkeys": "37.0.0", "@udecode/react-utils": "49.0.15", "@udecode/utils": "47.2.7" diff --git a/packages/playwright/package.json b/packages/playwright/package.json index 32f78877cc..f21d188741 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -47,7 +47,7 @@ }, "peerDependencies": { "@playwright/test": ">=1.42.1", - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/resizable/package.json b/packages/resizable/package.json index 319799e1bc..c64de807e3 100644 --- a/packages/resizable/package.json +++ b/packages/resizable/package.json @@ -46,7 +46,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/selection/package.json b/packages/selection/package.json index de12ac8e6d..d06caa642b 100644 --- a/packages/selection/package.json +++ b/packages/selection/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/slash-command/package.json b/packages/slash-command/package.json index a658fb8933..c3a835db79 100644 --- a/packages/slash-command/package.json +++ b/packages/slash-command/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/suggestion/package.json b/packages/suggestion/package.json index 087c2561a6..b1e9801b01 100644 --- a/packages/suggestion/package.json +++ b/packages/suggestion/package.json @@ -57,7 +57,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/tabbable/package.json b/packages/tabbable/package.json index 954e3bb841..ecda8444e2 100644 --- a/packages/tabbable/package.json +++ b/packages/tabbable/package.json @@ -56,7 +56,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/table/package.json b/packages/table/package.json index c31ce81609..bff2cb79d5 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -57,7 +57,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/tag/package.json b/packages/tag/package.json index 2a64ddaee1..15da8b05bb 100644 --- a/packages/tag/package.json +++ b/packages/tag/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/toc/package.json b/packages/toc/package.json index 1cde36cfcc..a9e089e4f7 100644 --- a/packages/toc/package.json +++ b/packages/toc/package.json @@ -53,7 +53,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/toggle/package.json b/packages/toggle/package.json index b962122c01..2c2bb1c79e 100644 --- a/packages/toggle/package.json +++ b/packages/toggle/package.json @@ -57,7 +57,7 @@ "platejs": "workspace:^" }, "peerDependencies": { - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index cc855c25cd..33f77a5f84 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,7 @@ # @platejs/utils +## 49.0.16 + ## 49.0.15 ## 49.0.14 diff --git a/packages/utils/package.json b/packages/utils/package.json index b0ad62ac60..ac6bdfdbc4 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@platejs/utils", - "version": "49.0.15", + "version": "49.0.16", "description": "Plate utils", "keywords": [ "plate", @@ -50,7 +50,7 @@ "typecheck": "yarn p:typecheck" }, "dependencies": { - "@platejs/core": "49.0.15", + "@platejs/core": "49.0.16", "@platejs/slate": "49.0.2", "@udecode/react-utils": "49.0.15", "@udecode/utils": "47.2.7", diff --git a/packages/yjs/package.json b/packages/yjs/package.json index 89220ea594..ceb4d24634 100644 --- a/packages/yjs/package.json +++ b/packages/yjs/package.json @@ -59,7 +59,7 @@ }, "peerDependencies": { "@hocuspocus/provider": "^2.15.2", - "platejs": ">=49.0.15", + "platejs": ">=49.0.16", "react": ">=18.0.0", "react-dom": ">=18.0.0", "y-webrtc": "10.3.0"