Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
22 lines
908 B
Plaintext
22 lines
908 B
Plaintext
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
*/
|
|
import { type LexicalEditor } from 'lexical';
|
|
/**
|
|
* Place one or multiple newly created Nodes at the passed Range's position.
|
|
* Multiple nodes will only be created when the Range spans multiple lines (aka
|
|
* client rects).
|
|
*
|
|
* This function can come particularly useful to highlight particular parts of
|
|
* the text without interfering with the EditorState, that will often replicate
|
|
* the state across collab and clipboard.
|
|
*
|
|
* This function accounts for DOM updates which can modify the passed Range.
|
|
* Hence, the function return to remove the listener.
|
|
*/
|
|
export default function mlcPositionNodeOnRange(editor: LexicalEditor, range: Range, onReposition: (node: Array<HTMLElement>) => void): () => void;
|