Releases: udecode/plate
Releases · udecode/plate
@udecode/[email protected]
@udecode/[email protected]
Patch Changes
-
#3943 by @felixfeng33 –
editor.api.html.deserialize
: Support deserialization from PlateStatic.New:
getEditorDOMFromHtmlString
returns the editor element in html string (the one withdata-slate-editor="true"
).New utilities for checking Slate nodes in HTML:
isSlateVoid
: Check if an HTML element is a Slate void nodeisSlateElement
: Check if an HTML element is a Slate element nodeisSlateString
: Check if an HTML element is a Slate string nodeisSlateLeaf
: Check if an HTML element is a Slate leaf nodeisSlateNode
: Check if an HTML element is any type of Slate nodeisSlatePluginElement
: Check if an HTML element is a Slate element node with a specific plugin keyisSlatePluginNode
: Check if an HTML element has a specific plugin key classgetSlateElements
: Get all Slate element nodes in an HTML element
@udecode/[email protected]
Patch Changes
- #3943 by @felixfeng33 – Support deserialization from PlateStatic.
@udecode/[email protected]
Patch Changes
- #3943 by @felixfeng33 – Support deserialization from PlateStatic.
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
Patch Changes
- #3952 by @zbeyens –
- Fix
editor.api.last(at, { level: 0 })
when editor has no children, it should returnundefined
. Fixes error on cmd+a > backspace. - Fix
editor.tf.removeNodes
whenpreviousEmptyBlock
is true withoutat
option, it should return early.- Fixes #3960
- Add
RangeApi.contains
to check if a range fully contains another range (both start and end points). - Add
editor.api.isSelected(target, { contains?: boolean })
to check if a path or range is selected by the current selection. Whencontains
is true, checks if selection fully contains the target. editor.tf.insertText
now support both legacy slate transformseditor.insertText
andTransforms.insertText
:editor.insertText
->editor.tf.insertText
withoutat
option. In addition,marks: false
option can be used to exclude current marks. Default istrue
.Transforms.insertText
->editor.tf.insertText
withat
option
- Add
editor.api.next
optionfrom
:from?: 'after' | 'child'
(default:'after'
): Determines where to start traversing from'after'
: Start from the point after the current location'child'
: Start from the first child of the current path.at
must be a path.
- Add
editor.api.previous
optionfrom
:from?: 'before' | 'parent'
(default:'before'
): Determines where to start traversing from'before'
: Start from the point before the current location'parent'
: Start from the parent of the current path.at
must be a path.
- Fix