/** * 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 {$generateNodesFromDOMViaExtension} from '@lexical/html'; import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; import {$getRoot, $insertNodes} from 'lexical'; import {useCallback, useRef, useState} from 'react'; // Vite's `?raw` query inlines the file contents as a string at build // time, so the dialog can ship the exact clipboard payloads (with the // full