Skip to content

Commit

Permalink
Remove changes to $getClipboardDataFromSelection
Browse files Browse the repository at this point in the history
  • Loading branch information
citruscai committed Oct 25, 2024
1 parent b74e691 commit 12b31d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/lexical-clipboard/src/clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,13 +523,12 @@ const clipboardDataFunctions = [
*/
export function $getClipboardDataFromSelection(
selection: BaseSelection | null = $getSelection(),
editor: LexicalEditor = $getEditor(),
): LexicalClipboardData {
const clipboardData: LexicalClipboardData = {
'text/plain': selection ? selection.getTextContent() : '',
'web application/x-lexical-editor': $getLexicalContent(editor, selection),
};
if (selection) {
const editor = $getEditor();
for (const [mimeType, $editorFn] of clipboardDataFunctions) {
const v = $editorFn(editor, selection);
if (v !== null) {
Expand Down

0 comments on commit 12b31d4

Please sign in to comment.