Skip to content

Commit a6c3e52

Browse files
committed
changeset
1 parent a9a9551 commit a6c3e52

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.changeset/platejs-core-minor.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@platejs/core': patch
3+
---
4+
5+
Added comprehensive copy functionality and view editor support for static rendering.
6+
7+
**New Components:**
8+
9+
- Added `PlateView` component for static editor rendering with copy support
10+
- Added `usePlateViewEditor` hook for creating memoized static editors
11+
12+
**Static Editor Enhancements:**
13+
14+
- Added `withStatic` HOC to enhance editors with static rendering capabilities
15+
- Added `ViewPlugin` that enables copy operations in static editors
16+
- Added `getStaticPlugins` to configure plugins for static rendering
17+
- Added `onCopy` handler that properly serializes content with `x-slate-fragment` format
18+
19+
**New Utilities:**
20+
21+
- Added `getSelectedDomBlocks` to extract selected DOM elements with Slate metadata
22+
- Added `getSelectedDomNode` to get DOM nodes from browser selection
23+
- Added `isSelectOutside` to check if selection is outside editor bounds
24+
- Added `getPlainText` to recursively extract plain text from DOM nodes
25+
26+
This enables seamless copy operations from static Plate editors, allowing content to be pasted into other Slate editors while preserving rich formatting and structure.

0 commit comments

Comments
 (0)