slate-angular 19.4.0-next.0 → 19.4.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1036,15 +1036,15 @@ const withAngular = (editor, clipboardFormatKey = 'x-slate-fragment') => {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
};
|
|
1038
1038
|
e.insertData = async (data) => {
|
|
1039
|
-
if (!(await e.customInsertFragmentData(data))) {
|
|
1039
|
+
if (!(await e.customInsertFragmentData(data, null))) {
|
|
1040
1040
|
e.insertTextData(data);
|
|
1041
1041
|
}
|
|
1042
1042
|
};
|
|
1043
|
-
e.customInsertFragmentData = async (data) => {
|
|
1043
|
+
e.customInsertFragmentData = async (data, contextClipboardData) => {
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Checking copied fragment from application/x-slate-fragment or data-slate-fragment
|
|
1046
1046
|
*/
|
|
1047
|
-
const clipboardData = await getClipboardData(data);
|
|
1047
|
+
const clipboardData = contextClipboardData || (await getClipboardData(data));
|
|
1048
1048
|
if (clipboardData && clipboardData.elements) {
|
|
1049
1049
|
e.insertFragment(clipboardData.elements);
|
|
1050
1050
|
return true;
|