Skip to content

Commit c33e960

Browse files
authored
Hotfix version bump legacyAdapter: 8.66.0 → 8.66.1 (#3369)
* Preserve new event pasteType when converting BeforePaste event (#3367) This change makes the converter prefer the pasteType already present on the new event, only falling back to the mapping from the old event when the new event doesn't have one * Hotfix version bump legacyAdapter: 8.66.0 → 8.66.1
1 parent 0f3c024 commit c33e960

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/roosterjs-editor-adapter/lib/editor/utils/eventConverter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export function oldEventToNewEvent<TOldEvent extends OldEvent>(
178178
htmlAfter: input.htmlAfter,
179179
htmlAttributes: input.htmlAttributes,
180180
htmlBefore: input.htmlBefore,
181-
pasteType: PasteTypeOldToNew[input.pasteType],
181+
pasteType: refBeforePasteEvent?.pasteType ?? PasteTypeOldToNew[input.pasteType],
182182
};
183183

184184
case PluginEventType.BeforeSetContent:

packages/roosterjs-editor-adapter/test/editor/utils/eventConverterTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('oldEventToNewEvent', () => {
161161
htmlAfter: mockedHtmlAfter,
162162
htmlBefore: mockedHtmlBefore,
163163
htmlAttributes: mockedHTmlAttributes,
164-
pasteType: 'asPlainText',
164+
pasteType: 'asImage',
165165
}
166166
);
167167
});

versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"react": "9.0.4",
33
"main": "9.54.0",
4-
"legacyAdapter": "8.66.0",
4+
"legacyAdapter": "8.66.1",
55
"overrides": {}
66
}

0 commit comments

Comments
 (0)