Skip to content

Releases: udecode/plate

@udecode/[email protected]

14 Jan 13:17
d50b73c
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

14 Jan 01:27
c94f133
Compare
Choose a tag to compare

Patch Changes

  • #3943 by @felixfeng33editor.api.html.deserialize: Support deserialization from PlateStatic.

    New: getEditorDOMFromHtmlString returns the editor element in html string (the one with data-slate-editor="true").

    New utilities for checking Slate nodes in HTML:

    • isSlateVoid: Check if an HTML element is a Slate void node
    • isSlateElement: Check if an HTML element is a Slate element node
    • isSlateString: Check if an HTML element is a Slate string node
    • isSlateLeaf: Check if an HTML element is a Slate leaf node
    • isSlateNode: Check if an HTML element is any type of Slate node
    • isSlatePluginElement: Check if an HTML element is a Slate element node with a specific plugin key
    • isSlatePluginNode: Check if an HTML element has a specific plugin key class
    • getSlateElements: Get all Slate element nodes in an HTML element

@udecode/[email protected]

14 Jan 01:27
c94f133
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

14 Jan 01:27
c94f133
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

14 Jan 01:27
c94f133
Compare
Choose a tag to compare

@udecode/[email protected]

14 Jan 18:56
c5f716e
Compare
Choose a tag to compare

Minor Changes

  • #3980 by @zbeyens

    • useAIChatEditor: add editor as first parameter:
    const aiEditor = usePlateEditor({ plugins });
    useAIChatEditor(aiEditor, content);

@udecode/[email protected]

13 Jan 02:44
fefc6f4
Compare
Choose a tag to compare

Patch Changes

  • #3952 by @zbeyens
    • Fix editor.api.last(at, { level: 0 }) when editor has no children, it should return undefined. Fixes error on cmd+a > backspace.
    • Fix editor.tf.removeNodes when previousEmptyBlock is true without at option, it should return early.
    • 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. When contains is true, checks if selection fully contains the target.
    • editor.tf.insertText now support both legacy slate transforms editor.insertText and Transforms.insertText:
      • editor.insertText -> editor.tf.insertText without at option. In addition, marks: false option can be used to exclude current marks. Default is true.
      • Transforms.insertText -> editor.tf.insertText with at option
    • Add editor.api.next option from:
      • 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 option from:
      • 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.

@udecode/[email protected]

13 Jan 02:57
dbd03ca
Compare
Choose a tag to compare

@udecode/[email protected]

13 Jan 02:44
fefc6f4
Compare
Choose a tag to compare

@udecode/[email protected]

13 Jan 02:57
dbd03ca
Compare
Choose a tag to compare