@platejs/core@49.0.16
-
#4441 by @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 withx-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.
- Added
-
a6c3e52
by @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 withx-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.
- Added
@platejs/link@49.0.15
-
- Improved return type of
getLinkAttributes
to 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