roosterjs-content-model-plugins 0.21.2 → 0.21.4
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.
- package/lib/edit/ContentModelEditPlugin.d.ts +35 -35
- package/lib/edit/ContentModelEditPlugin.js +75 -75
- package/lib/edit/ContentModelEditPlugin.js.map +1 -1
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.js +19 -19
- package/lib/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
- package/lib/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
- package/lib/edit/deleteSteps/deleteCollapsedSelection.js +90 -90
- package/lib/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib/edit/deleteSteps/deleteWordSelection.js +170 -170
- package/lib/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib/edit/handleKeyboardEventCommon.d.ts +15 -15
- package/lib/edit/handleKeyboardEventCommon.js +54 -54
- package/lib/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib/edit/keyboardDelete.d.ts +8 -8
- package/lib/edit/keyboardDelete.js +67 -67
- package/lib/edit/keyboardDelete.js.map +1 -1
- package/lib/edit/keyboardInput.d.ts +5 -5
- package/lib/edit/keyboardInput.js +50 -49
- package/lib/edit/keyboardInput.js.map +1 -1
- package/lib/edit/utils/getLeafSiblingBlock.d.ts +23 -23
- package/lib/edit/utils/getLeafSiblingBlock.js +75 -75
- package/lib/edit/utils/getLeafSiblingBlock.js.map +1 -1
- package/lib/entityDelimiter/EntityDelimiterPlugin.d.ts +35 -35
- package/lib/entityDelimiter/EntityDelimiterPlugin.js +256 -254
- package/lib/entityDelimiter/EntityDelimiterPlugin.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +9 -9
- package/lib/index.js.map +1 -1
- package/lib/paste/ContentModelPastePlugin.d.ts +42 -42
- package/lib/paste/ContentModelPastePlugin.js +148 -148
- package/lib/paste/ContentModelPastePlugin.js.map +1 -1
- package/lib/paste/Excel/processPastedContentFromExcel.d.ts +13 -13
- package/lib/paste/Excel/processPastedContentFromExcel.js +82 -82
- package/lib/paste/Excel/processPastedContentFromExcel.js.map +1 -1
- package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
- package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.js +19 -19
- package/lib/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
- package/lib/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
- package/lib/paste/WacComponents/processPastedContentWacComponents.js +207 -207
- package/lib/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +12 -12
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.js +69 -69
- package/lib/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
- package/lib/paste/WordDesktop/processWordComments.d.ts +7 -7
- package/lib/paste/WordDesktop/processWordComments.js +21 -21
- package/lib/paste/WordDesktop/processWordComments.js.map +1 -1
- package/lib/paste/WordDesktop/processWordLists.d.ts +10 -10
- package/lib/paste/WordDesktop/processWordLists.js +154 -154
- package/lib/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib/paste/pasteSourceValidations/constants.js +21 -21
- package/lib/paste/pasteSourceValidations/constants.js.map +1 -1
- package/lib/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/documentContainWacElements.js +24 -24
- package/lib/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
- package/lib/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
- package/lib/paste/pasteSourceValidations/getPasteSource.js +43 -43
- package/lib/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.js +16 -16
- package/lib/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js +18 -18
- package/lib/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js +14 -14
- package/lib/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +14 -14
- package/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.js +18 -18
- package/lib/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
- package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
- package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.js +18 -18
- package/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
- package/lib/paste/utils/addParser.d.ts +5 -5
- package/lib/paste/utils/addParser.js +16 -16
- package/lib/paste/utils/addParser.js.map +1 -1
- package/lib/paste/utils/deprecatedColorParser.d.ts +5 -5
- package/lib/paste/utils/deprecatedColorParser.js +19 -19
- package/lib/paste/utils/deprecatedColorParser.js.map +1 -1
- package/lib/paste/utils/getStyles.d.ts +6 -6
- package/lib/paste/utils/getStyles.js +22 -22
- package/lib/paste/utils/getStyles.js.map +1 -1
- package/lib/paste/utils/linkParser.d.ts +5 -5
- package/lib/paste/utils/linkParser.js +27 -27
- package/lib/paste/utils/linkParser.js.map +1 -1
- package/lib/paste/utils/setProcessor.d.ts +5 -5
- package/lib/paste/utils/setProcessor.js +13 -13
- package/lib/paste/utils/setProcessor.js.map +1 -1
- package/lib-amd/edit/ContentModelEditPlugin.d.ts +35 -35
- package/lib-amd/edit/ContentModelEditPlugin.js +75 -75
- package/lib-amd/edit/ContentModelEditPlugin.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.js +20 -20
- package/lib-amd/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
- package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.js +89 -89
- package/lib-amd/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib-amd/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib-amd/edit/deleteSteps/deleteWordSelection.js +169 -169
- package/lib-amd/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib-amd/edit/handleKeyboardEventCommon.d.ts +15 -15
- package/lib-amd/edit/handleKeyboardEventCommon.js +55 -55
- package/lib-amd/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib-amd/edit/keyboardDelete.d.ts +8 -8
- package/lib-amd/edit/keyboardDelete.js +63 -63
- package/lib-amd/edit/keyboardDelete.js.map +1 -1
- package/lib-amd/edit/keyboardInput.d.ts +5 -5
- package/lib-amd/edit/keyboardInput.js +50 -49
- package/lib-amd/edit/keyboardInput.js.map +1 -1
- package/lib-amd/edit/utils/getLeafSiblingBlock.d.ts +23 -23
- package/lib-amd/edit/utils/getLeafSiblingBlock.js +75 -75
- package/lib-amd/edit/utils/getLeafSiblingBlock.js.map +1 -1
- package/lib-amd/entityDelimiter/EntityDelimiterPlugin.d.ts +35 -35
- package/lib-amd/entityDelimiter/EntityDelimiterPlugin.js +255 -253
- package/lib-amd/entityDelimiter/EntityDelimiterPlugin.js.map +1 -1
- package/lib-amd/index.d.ts +3 -3
- package/lib-amd/index.js +8 -8
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/paste/ContentModelPastePlugin.d.ts +42 -42
- package/lib-amd/paste/ContentModelPastePlugin.js +140 -140
- package/lib-amd/paste/ContentModelPastePlugin.js.map +1 -1
- package/lib-amd/paste/Excel/processPastedContentFromExcel.d.ts +13 -13
- package/lib-amd/paste/Excel/processPastedContentFromExcel.js +80 -80
- package/lib-amd/paste/Excel/processPastedContentFromExcel.js.map +1 -1
- package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
- package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.js +20 -20
- package/lib-amd/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js +206 -206
- package/lib-amd/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +12 -12
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.js +64 -64
- package/lib-amd/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
- package/lib-amd/paste/WordDesktop/processWordComments.d.ts +7 -7
- package/lib-amd/paste/WordDesktop/processWordComments.js +22 -22
- package/lib-amd/paste/WordDesktop/processWordComments.js.map +1 -1
- package/lib-amd/paste/WordDesktop/processWordLists.d.ts +10 -10
- package/lib-amd/paste/WordDesktop/processWordLists.js +153 -153
- package/lib-amd/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib-amd/paste/pasteSourceValidations/constants.js +23 -23
- package/lib-amd/paste/pasteSourceValidations/constants.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.js +26 -26
- package/lib-amd/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
- package/lib-amd/paste/pasteSourceValidations/getPasteSource.js +38 -38
- package/lib-amd/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.js +18 -18
- package/lib-amd/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.js +20 -20
- package/lib-amd/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.js +16 -16
- package/lib-amd/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +16 -16
- package/lib-amd/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
- package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.js +20 -20
- package/lib-amd/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
- package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
- package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.js +20 -20
- package/lib-amd/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
- package/lib-amd/paste/utils/addParser.d.ts +5 -5
- package/lib-amd/paste/utils/addParser.js +18 -18
- package/lib-amd/paste/utils/addParser.js.map +1 -1
- package/lib-amd/paste/utils/deprecatedColorParser.d.ts +5 -5
- package/lib-amd/paste/utils/deprecatedColorParser.js +20 -20
- package/lib-amd/paste/utils/deprecatedColorParser.js.map +1 -1
- package/lib-amd/paste/utils/getStyles.d.ts +6 -6
- package/lib-amd/paste/utils/getStyles.js +24 -24
- package/lib-amd/paste/utils/getStyles.js.map +1 -1
- package/lib-amd/paste/utils/linkParser.d.ts +5 -5
- package/lib-amd/paste/utils/linkParser.js +28 -28
- package/lib-amd/paste/utils/linkParser.js.map +1 -1
- package/lib-amd/paste/utils/setProcessor.d.ts +5 -5
- package/lib-amd/paste/utils/setProcessor.js +15 -15
- package/lib-amd/paste/utils/setProcessor.js.map +1 -1
- package/lib-mjs/edit/ContentModelEditPlugin.d.ts +35 -35
- package/lib-mjs/edit/ContentModelEditPlugin.js +72 -72
- package/lib-mjs/edit/ContentModelEditPlugin.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.d.ts +5 -5
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.js +15 -15
- package/lib-mjs/edit/deleteSteps/deleteAllSegmentBefore.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.d.ts +9 -9
- package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.js +87 -87
- package/lib-mjs/edit/deleteSteps/deleteCollapsedSelection.js.map +1 -1
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.d.ts +9 -9
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.js +167 -167
- package/lib-mjs/edit/deleteSteps/deleteWordSelection.js.map +1 -1
- package/lib-mjs/edit/handleKeyboardEventCommon.d.ts +15 -15
- package/lib-mjs/edit/handleKeyboardEventCommon.js +48 -48
- package/lib-mjs/edit/handleKeyboardEventCommon.js.map +1 -1
- package/lib-mjs/edit/keyboardDelete.d.ts +8 -8
- package/lib-mjs/edit/keyboardDelete.js +63 -63
- package/lib-mjs/edit/keyboardDelete.js.map +1 -1
- package/lib-mjs/edit/keyboardInput.d.ts +5 -5
- package/lib-mjs/edit/keyboardInput.js +46 -45
- package/lib-mjs/edit/keyboardInput.js.map +1 -1
- package/lib-mjs/edit/utils/getLeafSiblingBlock.d.ts +23 -23
- package/lib-mjs/edit/utils/getLeafSiblingBlock.js +71 -71
- package/lib-mjs/edit/utils/getLeafSiblingBlock.js.map +1 -1
- package/lib-mjs/entityDelimiter/EntityDelimiterPlugin.d.ts +35 -35
- package/lib-mjs/entityDelimiter/EntityDelimiterPlugin.js +252 -250
- package/lib-mjs/entityDelimiter/EntityDelimiterPlugin.js.map +1 -1
- package/lib-mjs/index.d.ts +3 -3
- package/lib-mjs/index.js +3 -3
- package/lib-mjs/index.js.map +1 -1
- package/lib-mjs/paste/ContentModelPastePlugin.d.ts +42 -42
- package/lib-mjs/paste/ContentModelPastePlugin.js +145 -145
- package/lib-mjs/paste/ContentModelPastePlugin.js.map +1 -1
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.d.ts +13 -13
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.js +77 -77
- package/lib-mjs/paste/Excel/processPastedContentFromExcel.js.map +1 -1
- package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.d.ts +7 -7
- package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.js +15 -15
- package/lib-mjs/paste/PowerPoint/processPastedContentFromPowerPoint.js.map +1 -1
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.d.ts +9 -9
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js +203 -203
- package/lib-mjs/paste/WacComponents/processPastedContentWacComponents.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.d.ts +12 -12
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.js +64 -64
- package/lib-mjs/paste/WordDesktop/processPastedContentFromWordDesktop.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/processWordComments.d.ts +7 -7
- package/lib-mjs/paste/WordDesktop/processWordComments.js +17 -17
- package/lib-mjs/paste/WordDesktop/processWordComments.js.map +1 -1
- package/lib-mjs/paste/WordDesktop/processWordLists.d.ts +10 -10
- package/lib-mjs/paste/WordDesktop/processWordLists.js +150 -150
- package/lib-mjs/paste/WordDesktop/processWordLists.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/constants.d.ts +17 -17
- package/lib-mjs/paste/pasteSourceValidations/constants.js +18 -18
- package/lib-mjs/paste/pasteSourceValidations/constants.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.js +20 -20
- package/lib-mjs/paste/pasteSourceValidations/documentContainWacElements.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/getPasteSource.d.ts +27 -27
- package/lib-mjs/paste/pasteSourceValidations/getPasteSource.js +39 -39
- package/lib-mjs/paste/pasteSourceValidations/getPasteSource.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.js +12 -12
- package/lib-mjs/paste/pasteSourceValidations/isExcelDesktopDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.js +14 -14
- package/lib-mjs/paste/pasteSourceValidations/isExcelOnlineDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.js +10 -10
- package/lib-mjs/paste/pasteSourceValidations/isGoogleSheetDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.js +10 -10
- package/lib-mjs/paste/pasteSourceValidations/isPowerPointDesktopDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.d.ts +8 -8
- package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.js +14 -14
- package/lib-mjs/paste/pasteSourceValidations/isWordDesktopDocument.js.map +1 -1
- package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.d.ts +9 -9
- package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.js +14 -14
- package/lib-mjs/paste/pasteSourceValidations/shouldConvertToSingleImage.js.map +1 -1
- package/lib-mjs/paste/utils/addParser.d.ts +5 -5
- package/lib-mjs/paste/utils/addParser.js +13 -13
- package/lib-mjs/paste/utils/addParser.js.map +1 -1
- package/lib-mjs/paste/utils/deprecatedColorParser.d.ts +5 -5
- package/lib-mjs/paste/utils/deprecatedColorParser.js +15 -15
- package/lib-mjs/paste/utils/deprecatedColorParser.js.map +1 -1
- package/lib-mjs/paste/utils/getStyles.d.ts +6 -6
- package/lib-mjs/paste/utils/getStyles.js +18 -18
- package/lib-mjs/paste/utils/getStyles.js.map +1 -1
- package/lib-mjs/paste/utils/linkParser.d.ts +5 -5
- package/lib-mjs/paste/utils/linkParser.js +23 -23
- package/lib-mjs/paste/utils/linkParser.js.map +1 -1
- package/lib-mjs/paste/utils/setProcessor.d.ts +5 -5
- package/lib-mjs/paste/utils/setProcessor.js +9 -9
- package/lib-mjs/paste/utils/setProcessor.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPowerPointDesktopDocument = void 0;
|
|
4
|
-
var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
8
|
-
* @param props Properties related to the PasteEvent
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
var isPowerPointDesktopDocument = function (props) {
|
|
12
|
-
return props.htmlAttributes["ProgId" /* PROG_ID_NAME */] == POWERPOINT_ATTRIBUTE_VALUE;
|
|
13
|
-
};
|
|
14
|
-
exports.isPowerPointDesktopDocument = isPowerPointDesktopDocument;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPowerPointDesktopDocument = void 0;
|
|
4
|
+
var POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
* Checks whether the Array provided contains strings that identify Power Point Desktop documents
|
|
8
|
+
* @param props Properties related to the PasteEvent
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
var isPowerPointDesktopDocument = function (props) {
|
|
12
|
+
return props.htmlAttributes["ProgId" /* PROG_ID_NAME */] == POWERPOINT_ATTRIBUTE_VALUE;
|
|
13
|
+
};
|
|
14
|
+
exports.isPowerPointDesktopDocument = isPowerPointDesktopDocument;
|
|
15
15
|
//# sourceMappingURL=isPowerPointDesktopDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPowerPointDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.ts"],"names":[],"mappings":";;;AAGA,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAEtD;;;;;GAKG;AACI,IAAM,2BAA2B,GAAsB,UAAA,KAAK;IAC/D,OAAO,KAAK,CAAC,cAAc,6BAAiC,IAAI,0BAA0B,CAAC;AAC/F,CAAC,CAAC;AAFW,QAAA,2BAA2B,+BAEtC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isPowerPointDesktopDocument: GetSourceFunction = props => {\n return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"isPowerPointDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isPowerPointDesktopDocument.ts"],"names":[],"mappings":";;;AAGA,IAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAEtD;;;;;GAKG;AACI,IAAM,2BAA2B,GAAsB,UAAA,KAAK;IAC/D,OAAO,KAAK,CAAC,cAAc,6BAAiC,IAAI,0BAA0B,CAAC;AAC/F,CAAC,CAAC;AAFW,QAAA,2BAA2B,+BAEtC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst POWERPOINT_ATTRIBUTE_VALUE = 'PowerPoint.Slide';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Power Point Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isPowerPointDesktopDocument: GetSourceFunction = props => {\r\n return props.htmlAttributes[PastePropertyNames.PROG_ID_NAME] == POWERPOINT_ATTRIBUTE_VALUE;\r\n};\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
5
|
-
* @param props Properties related to the PasteEvent
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare const isWordDesktopDocument: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
5
|
+
* @param props Properties related to the PasteEvent
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const isWordDesktopDocument: GetSourceFunction;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isWordDesktopDocument = void 0;
|
|
4
|
-
var WORD_ATTRIBUTE_NAME = 'xmlns:w';
|
|
5
|
-
var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
|
|
6
|
-
var WORD_PROG_ID = 'Word.Document';
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
10
|
-
* @param props Properties related to the PasteEvent
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
var isWordDesktopDocument = function (props) {
|
|
14
|
-
var htmlAttributes = props.htmlAttributes;
|
|
15
|
-
return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
|
|
16
|
-
htmlAttributes["ProgId" /* PROG_ID_NAME */] == WORD_PROG_ID);
|
|
17
|
-
};
|
|
18
|
-
exports.isWordDesktopDocument = isWordDesktopDocument;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isWordDesktopDocument = void 0;
|
|
4
|
+
var WORD_ATTRIBUTE_NAME = 'xmlns:w';
|
|
5
|
+
var WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';
|
|
6
|
+
var WORD_PROG_ID = 'Word.Document';
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
* Checks whether the Array provided contains strings that identify Word Desktop documents
|
|
10
|
+
* @param props Properties related to the PasteEvent
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
var isWordDesktopDocument = function (props) {
|
|
14
|
+
var htmlAttributes = props.htmlAttributes;
|
|
15
|
+
return (htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||
|
|
16
|
+
htmlAttributes["ProgId" /* PROG_ID_NAME */] == WORD_PROG_ID);
|
|
17
|
+
};
|
|
18
|
+
exports.isWordDesktopDocument = isWordDesktopDocument;
|
|
19
19
|
//# sourceMappingURL=isWordDesktopDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isWordDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isWordDesktopDocument.ts"],"names":[],"mappings":";;;AAGA,IAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;AACrE,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;;;GAKG;AACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;QAC3D,cAAc,6BAAiC,IAAI,YAAY,CAClE,CAAC;AACN,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC","sourcesContent":["import { PastePropertyNames } from './constants';\nimport type { GetSourceFunction } from './getPasteSource';\n\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\nconst WORD_PROG_ID = 'Word.Document';\n\n/**\n * @internal\n * Checks whether the Array provided contains strings that identify Word Desktop documents\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const isWordDesktopDocument: GetSourceFunction = props => {\n const { htmlAttributes } = props;\n return (\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"isWordDesktopDocument.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/isWordDesktopDocument.ts"],"names":[],"mappings":";;;AAGA,IAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,IAAM,oBAAoB,GAAG,uCAAuC,CAAC;AACrE,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;;;GAKG;AACI,IAAM,qBAAqB,GAAsB,UAAA,KAAK;IACjD,IAAA,cAAc,GAAK,KAAK,eAAV,CAAW;IACjC,OAAO,CACH,cAAc,CAAC,mBAAmB,CAAC,IAAI,oBAAoB;QAC3D,cAAc,6BAAiC,IAAI,YAAY,CAClE,CAAC;AACN,CAAC,CAAC;AANW,QAAA,qBAAqB,yBAMhC","sourcesContent":["import { PastePropertyNames } from './constants';\r\nimport type { GetSourceFunction } from './getPasteSource';\r\n\r\nconst WORD_ATTRIBUTE_NAME = 'xmlns:w';\r\nconst WORD_ATTRIBUTE_VALUE = 'urn:schemas-microsoft-com:office:word';\r\nconst WORD_PROG_ID = 'Word.Document';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the Array provided contains strings that identify Word Desktop documents\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const isWordDesktopDocument: GetSourceFunction = props => {\r\n const { htmlAttributes } = props;\r\n return (\r\n htmlAttributes[WORD_ATTRIBUTE_NAME] == WORD_ATTRIBUTE_VALUE ||\r\n htmlAttributes[PastePropertyNames.PROG_ID_NAME] == WORD_PROG_ID\r\n );\r\n};\r\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
* Checks whether the fragment only contains a single image to paste
|
|
5
|
-
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
6
|
-
* @param props Properties related to the PasteEvent
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export declare const shouldConvertToSingleImage: GetSourceFunction;
|
|
1
|
+
import type { GetSourceFunction } from './getPasteSource';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Checks whether the fragment only contains a single image to paste
|
|
5
|
+
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
6
|
+
* @param props Properties related to the PasteEvent
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const shouldConvertToSingleImage: GetSourceFunction;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldConvertToSingleImage = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
* Checks whether the fragment only contains a single image to paste
|
|
7
|
-
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
8
|
-
* @param props Properties related to the PasteEvent
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
var shouldConvertToSingleImage = function (props) {
|
|
12
|
-
var _a;
|
|
13
|
-
var shouldConvertSingleImage = props.shouldConvertSingleImage, clipboardData = props.clipboardData;
|
|
14
|
-
return (shouldConvertSingleImage &&
|
|
15
|
-
((_a = clipboardData.htmlFirstLevelChildTags) === null || _a === void 0 ? void 0 : _a.length) == 1 &&
|
|
16
|
-
clipboardData.htmlFirstLevelChildTags[0] == 'IMG');
|
|
17
|
-
};
|
|
18
|
-
exports.shouldConvertToSingleImage = shouldConvertToSingleImage;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shouldConvertToSingleImage = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Checks whether the fragment only contains a single image to paste
|
|
7
|
+
* and the editor have the ConvertSingleImageBody Experimental feature
|
|
8
|
+
* @param props Properties related to the PasteEvent
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
var shouldConvertToSingleImage = function (props) {
|
|
12
|
+
var _a;
|
|
13
|
+
var shouldConvertSingleImage = props.shouldConvertSingleImage, clipboardData = props.clipboardData;
|
|
14
|
+
return (shouldConvertSingleImage &&
|
|
15
|
+
((_a = clipboardData.htmlFirstLevelChildTags) === null || _a === void 0 ? void 0 : _a.length) == 1 &&
|
|
16
|
+
clipboardData.htmlFirstLevelChildTags[0] == 'IMG');
|
|
17
|
+
};
|
|
18
|
+
exports.shouldConvertToSingleImage = shouldConvertToSingleImage;
|
|
19
19
|
//# sourceMappingURL=shouldConvertToSingleImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shouldConvertToSingleImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACI,IAAM,0BAA0B,GAAsB,UAAA,KAAK;;IACtD,IAAA,wBAAwB,GAAoB,KAAK,yBAAzB,EAAE,aAAa,GAAK,KAAK,cAAV,CAAW;IAC1D,OAAO,CACH,wBAAwB;QACxB,CAAA,MAAA,aAAa,CAAC,uBAAuB,0CAAE,MAAM,KAAI,CAAC;QAClD,aAAa,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,KAAK,CACpD,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,0BAA0B,8BAOrC","sourcesContent":["import type { GetSourceFunction } from './getPasteSource';\n\n/**\n * @internal\n * Checks whether the fragment only contains a single image to paste\n * and the editor have the ConvertSingleImageBody Experimental feature\n * @param props Properties related to the PasteEvent\n * @returns\n */\nexport const shouldConvertToSingleImage: GetSourceFunction = props => {\n const { shouldConvertSingleImage, clipboardData } = props;\n return (\n shouldConvertSingleImage &&\n clipboardData.htmlFirstLevelChildTags?.length == 1 &&\n clipboardData.htmlFirstLevelChildTags[0] == 'IMG'\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"shouldConvertToSingleImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/pasteSourceValidations/shouldConvertToSingleImage.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACI,IAAM,0BAA0B,GAAsB,UAAA,KAAK;;IACtD,IAAA,wBAAwB,GAAoB,KAAK,yBAAzB,EAAE,aAAa,GAAK,KAAK,cAAV,CAAW;IAC1D,OAAO,CACH,wBAAwB;QACxB,CAAA,MAAA,aAAa,CAAC,uBAAuB,0CAAE,MAAM,KAAI,CAAC;QAClD,aAAa,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,KAAK,CACpD,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,0BAA0B,8BAOrC","sourcesContent":["import type { GetSourceFunction } from './getPasteSource';\r\n\r\n/**\r\n * @internal\r\n * Checks whether the fragment only contains a single image to paste\r\n * and the editor have the ConvertSingleImageBody Experimental feature\r\n * @param props Properties related to the PasteEvent\r\n * @returns\r\n */\r\nexport const shouldConvertToSingleImage: GetSourceFunction = props => {\r\n const { shouldConvertSingleImage, clipboardData } = props;\r\n return (\r\n shouldConvertSingleImage &&\r\n clipboardData.htmlFirstLevelChildTags?.length == 1 &&\r\n clipboardData.htmlFirstLevelChildTags[0] == 'IMG'\r\n );\r\n};\r\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ContentModelFormatMap, DomToModelOption, FormatParser, FormatParsersPerCategory } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export default function addParser<TKey extends keyof FormatParsersPerCategory>(domToModelOption: DomToModelOption, entry: TKey, additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>): void;
|
|
1
|
+
import type { ContentModelFormatMap, DomToModelOption, FormatParser, FormatParsersPerCategory } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export default function addParser<TKey extends keyof FormatParsersPerCategory>(domToModelOption: DomToModelOption, entry: TKey, additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>): void;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
function addParser(domToModelOption, entry, additionalFormatParsers) {
|
|
7
|
-
var _a;
|
|
8
|
-
if (!domToModelOption.additionalFormatParsers) {
|
|
9
|
-
domToModelOption.additionalFormatParsers = {};
|
|
10
|
-
}
|
|
11
|
-
if (!domToModelOption.additionalFormatParsers[entry]) {
|
|
12
|
-
domToModelOption.additionalFormatParsers[entry] = [];
|
|
13
|
-
}
|
|
14
|
-
(_a = domToModelOption.additionalFormatParsers[entry]) === null || _a === void 0 ? void 0 : _a.push(additionalFormatParsers);
|
|
15
|
-
}
|
|
16
|
-
exports.default = addParser;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
function addParser(domToModelOption, entry, additionalFormatParsers) {
|
|
7
|
+
var _a;
|
|
8
|
+
if (!domToModelOption.additionalFormatParsers) {
|
|
9
|
+
domToModelOption.additionalFormatParsers = {};
|
|
10
|
+
}
|
|
11
|
+
if (!domToModelOption.additionalFormatParsers[entry]) {
|
|
12
|
+
domToModelOption.additionalFormatParsers[entry] = [];
|
|
13
|
+
}
|
|
14
|
+
(_a = domToModelOption.additionalFormatParsers[entry]) === null || _a === void 0 ? void 0 : _a.push(additionalFormatParsers);
|
|
15
|
+
}
|
|
16
|
+
exports.default = addParser;
|
|
17
17
|
//# sourceMappingURL=addParser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/addParser.ts"],"names":[],"mappings":";;AAOA;;GAEG;AACH,SAAwB,SAAS,CAC7B,gBAAkC,EAClC,KAAW,EACX,uBAAkE;;IAElE,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,EAAE;QAC3C,gBAAgB,CAAC,uBAAuB,GAAG,EAAE,CAAC;KACjD;IACD,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE;QAClD,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;KACxD;IAED,MAAA,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,0CAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnF,CAAC;AAbD,4BAaC","sourcesContent":["import type {\n ContentModelFormatMap,\n DomToModelOption,\n FormatParser,\n FormatParsersPerCategory,\n} from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport default function addParser<TKey extends keyof FormatParsersPerCategory>(\n domToModelOption: DomToModelOption,\n entry: TKey,\n additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>\n) {\n if (!domToModelOption.additionalFormatParsers) {\n domToModelOption.additionalFormatParsers = {};\n }\n if (!domToModelOption.additionalFormatParsers[entry]) {\n domToModelOption.additionalFormatParsers[entry] = [];\n }\n\n domToModelOption.additionalFormatParsers[entry]?.push(additionalFormatParsers);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"addParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/addParser.ts"],"names":[],"mappings":";;AAOA;;GAEG;AACH,SAAwB,SAAS,CAC7B,gBAAkC,EAClC,KAAW,EACX,uBAAkE;;IAElE,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,EAAE;QAC3C,gBAAgB,CAAC,uBAAuB,GAAG,EAAE,CAAC;KACjD;IACD,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE;QAClD,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;KACxD;IAED,MAAA,gBAAgB,CAAC,uBAAuB,CAAC,KAAK,CAAC,0CAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;AACnF,CAAC;AAbD,4BAaC","sourcesContent":["import type {\r\n ContentModelFormatMap,\r\n DomToModelOption,\r\n FormatParser,\r\n FormatParsersPerCategory,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport default function addParser<TKey extends keyof FormatParsersPerCategory>(\r\n domToModelOption: DomToModelOption,\r\n entry: TKey,\r\n additionalFormatParsers: FormatParser<ContentModelFormatMap[TKey]>\r\n) {\r\n if (!domToModelOption.additionalFormatParsers) {\r\n domToModelOption.additionalFormatParsers = {};\r\n }\r\n if (!domToModelOption.additionalFormatParsers[entry]) {\r\n domToModelOption.additionalFormatParsers[entry] = [];\r\n }\r\n\r\n domToModelOption.additionalFormatParsers[entry]?.push(additionalFormatParsers);\r\n}\r\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const deprecatedBorderColorParser: FormatParser<BorderFormat>;
|
|
1
|
+
import type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const deprecatedBorderColorParser: FormatParser<BorderFormat>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deprecatedBorderColorParser = void 0;
|
|
4
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
var deprecatedBorderColorParser = function (format) {
|
|
9
|
-
roosterjs_content_model_dom_1.BorderKeys.forEach(function (key) {
|
|
10
|
-
var value = format[key];
|
|
11
|
-
var color = '';
|
|
12
|
-
if (value &&
|
|
13
|
-
roosterjs_content_model_dom_1.DeprecatedColors.some(function (dColor) { return value.indexOf(dColor) > -1 && (color = dColor); })) {
|
|
14
|
-
var newValue = value.replace(color, '').trimRight();
|
|
15
|
-
format[key] = newValue;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
exports.deprecatedBorderColorParser = deprecatedBorderColorParser;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deprecatedBorderColorParser = void 0;
|
|
4
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
var deprecatedBorderColorParser = function (format) {
|
|
9
|
+
roosterjs_content_model_dom_1.BorderKeys.forEach(function (key) {
|
|
10
|
+
var value = format[key];
|
|
11
|
+
var color = '';
|
|
12
|
+
if (value &&
|
|
13
|
+
roosterjs_content_model_dom_1.DeprecatedColors.some(function (dColor) { return value.indexOf(dColor) > -1 && (color = dColor); })) {
|
|
14
|
+
var newValue = value.replace(color, '').trimRight();
|
|
15
|
+
format[key] = newValue;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
exports.deprecatedBorderColorParser = deprecatedBorderColorParser;
|
|
20
20
|
//# sourceMappingURL=deprecatedColorParser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecatedColorParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/deprecatedColorParser.ts"],"names":[],"mappings":";;;AAAA,2EAA2E;AAG3E;;GAEG;AACI,IAAM,2BAA2B,GAA+B,UACnE,MAAoB;IAEpB,wCAAU,CAAC,OAAO,CAAC,UAAA,GAAG;QAClB,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,KAAK,GAAW,EAAE,CAAC;QACvB,IACI,KAAK;YACL,8CAAgB,CAAC,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,EAA9C,CAA8C,CAAC,EACjF;YACE,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;YACtD,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;SAC1B;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAdW,QAAA,2BAA2B,+BActC","sourcesContent":["import { BorderKeys, DeprecatedColors } from 'roosterjs-content-model-dom';\nimport type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport const deprecatedBorderColorParser: FormatParser<BorderFormat> = (\n format: BorderFormat\n): void => {\n BorderKeys.forEach(key => {\n const value = format[key];\n let color: string = '';\n if (\n value &&\n DeprecatedColors.some(dColor => value.indexOf(dColor) > -1 && (color = dColor))\n ) {\n const newValue = value.replace(color, '').trimRight();\n format[key] = newValue;\n }\n });\n};\n"]}
|
|
1
|
+
{"version":3,"file":"deprecatedColorParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/deprecatedColorParser.ts"],"names":[],"mappings":";;;AAAA,2EAA2E;AAG3E;;GAEG;AACI,IAAM,2BAA2B,GAA+B,UACnE,MAAoB;IAEpB,wCAAU,CAAC,OAAO,CAAC,UAAA,GAAG;QAClB,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,KAAK,GAAW,EAAE,CAAC;QACvB,IACI,KAAK;YACL,8CAAgB,CAAC,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,EAA9C,CAA8C,CAAC,EACjF;YACE,IAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;YACtD,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;SAC1B;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAdW,QAAA,2BAA2B,+BActC","sourcesContent":["import { BorderKeys, DeprecatedColors } from 'roosterjs-content-model-dom';\r\nimport type { BorderFormat, FormatParser } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const deprecatedBorderColorParser: FormatParser<BorderFormat> = (\r\n format: BorderFormat\r\n): void => {\r\n BorderKeys.forEach(key => {\r\n const value = format[key];\r\n let color: string = '';\r\n if (\r\n value &&\r\n DeprecatedColors.some(dColor => value.indexOf(dColor) > -1 && (color = dColor))\r\n ) {\r\n const newValue = value.replace(color, '').trimRight();\r\n format[key] = newValue;\r\n }\r\n });\r\n};\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
* Get CSS styles of a given element in name-value pair format
|
|
4
|
-
* @param element The element to get styles from
|
|
5
|
-
*/
|
|
6
|
-
export declare function getStyles(element: HTMLElement): Record<string, string>;
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* Get CSS styles of a given element in name-value pair format
|
|
4
|
+
* @param element The element to get styles from
|
|
5
|
+
*/
|
|
6
|
+
export declare function getStyles(element: HTMLElement): Record<string, string>;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getStyles = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
* Get CSS styles of a given element in name-value pair format
|
|
7
|
-
* @param element The element to get styles from
|
|
8
|
-
*/
|
|
9
|
-
function getStyles(element) {
|
|
10
|
-
var result = {};
|
|
11
|
-
var style = (element === null || element === void 0 ? void 0 : element.getAttribute('style')) || '';
|
|
12
|
-
style.split(';').forEach(function (pair) {
|
|
13
|
-
var valueIndex = pair.indexOf(':');
|
|
14
|
-
var name = pair.slice(0, valueIndex);
|
|
15
|
-
var value = pair.slice(valueIndex + 1);
|
|
16
|
-
if (name && value) {
|
|
17
|
-
result[name.trim()] = value.trim();
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
exports.getStyles = getStyles;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStyles = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Get CSS styles of a given element in name-value pair format
|
|
7
|
+
* @param element The element to get styles from
|
|
8
|
+
*/
|
|
9
|
+
function getStyles(element) {
|
|
10
|
+
var result = {};
|
|
11
|
+
var style = (element === null || element === void 0 ? void 0 : element.getAttribute('style')) || '';
|
|
12
|
+
style.split(';').forEach(function (pair) {
|
|
13
|
+
var valueIndex = pair.indexOf(':');
|
|
14
|
+
var name = pair.slice(0, valueIndex);
|
|
15
|
+
var value = pair.slice(valueIndex + 1);
|
|
16
|
+
if (name && value) {
|
|
17
|
+
result[name.trim()] = value.trim();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
exports.getStyles = getStyles;
|
|
23
23
|
//# sourceMappingURL=getStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStyles.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/getStyles.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAoB;IAC1C,IAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,IAAM,KAAK,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;IACnD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QACzB,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACrC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QACzC,IAAI,IAAI,IAAI,KAAK,EAAE;YACf,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;SACtC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC;AAZD,8BAYC","sourcesContent":["/**\n * @internal\n * Get CSS styles of a given element in name-value pair format\n * @param element The element to get styles from\n */\nexport function getStyles(element: HTMLElement): Record<string, string> {\n const result: Record<string, string> = {};\n const style = element?.getAttribute('style') || '';\n style.split(';').forEach(pair => {\n const valueIndex = pair.indexOf(':');\n const name = pair.slice(0, valueIndex);\n const value = pair.slice(valueIndex + 1);\n if (name && value) {\n result[name.trim()] = value.trim();\n }\n });\n return result;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getStyles.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/getStyles.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAoB;IAC1C,IAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,IAAM,KAAK,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;IACnD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;QACzB,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACrC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;QACzC,IAAI,IAAI,IAAI,KAAK,EAAE;YACf,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;SACtC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC;AAZD,8BAYC","sourcesContent":["/**\r\n * @internal\r\n * Get CSS styles of a given element in name-value pair format\r\n * @param element The element to get styles from\r\n */\r\nexport function getStyles(element: HTMLElement): Record<string, string> {\r\n const result: Record<string, string> = {};\r\n const style = element?.getAttribute('style') || '';\r\n style.split(';').forEach(pair => {\r\n const valueIndex = pair.indexOf(':');\r\n const name = pair.slice(0, valueIndex);\r\n const value = pair.slice(valueIndex + 1);\r\n if (name && value) {\r\n result[name.trim()] = value.trim();\r\n }\r\n });\r\n return result;\r\n}\r\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ContentModelHyperLinkFormat, FormatParser } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const parseLink: FormatParser<ContentModelHyperLinkFormat>;
|
|
1
|
+
import type { ContentModelHyperLinkFormat, FormatParser } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const parseLink: FormatParser<ContentModelHyperLinkFormat>;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseLink = void 0;
|
|
4
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
-
var SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];
|
|
6
|
-
var INVALID_LINKS_REGEX = /^file:\/\/\/[a-zA-Z\/]/i;
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
var parseLink = function (format, element) {
|
|
11
|
-
if (!(0, roosterjs_content_model_dom_1.isElementOfType)(element, 'a')) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
var url;
|
|
15
|
-
try {
|
|
16
|
-
url = new URL(element.href);
|
|
17
|
-
}
|
|
18
|
-
catch (_a) {
|
|
19
|
-
url = undefined;
|
|
20
|
-
}
|
|
21
|
-
if ((url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) === -1) ||
|
|
22
|
-
INVALID_LINKS_REGEX.test(element.href)) {
|
|
23
|
-
element.removeAttribute('href');
|
|
24
|
-
format.href = '';
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.parseLink = parseLink;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseLink = void 0;
|
|
4
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
+
var SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];
|
|
6
|
+
var INVALID_LINKS_REGEX = /^file:\/\/\/[a-zA-Z\/]/i;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
var parseLink = function (format, element) {
|
|
11
|
+
if (!(0, roosterjs_content_model_dom_1.isElementOfType)(element, 'a')) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
var url;
|
|
15
|
+
try {
|
|
16
|
+
url = new URL(element.href);
|
|
17
|
+
}
|
|
18
|
+
catch (_a) {
|
|
19
|
+
url = undefined;
|
|
20
|
+
}
|
|
21
|
+
if ((url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) === -1) ||
|
|
22
|
+
INVALID_LINKS_REGEX.test(element.href)) {
|
|
23
|
+
element.removeAttribute('href');
|
|
24
|
+
format.href = '';
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.parseLink = parseLink;
|
|
28
28
|
//# sourceMappingURL=linkParser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/linkParser.ts"],"names":[],"mappings":";;;AAAA,2EAA8D;AAG9D,IAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACjF,IAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAEtD;;GAEG;AACI,IAAM,SAAS,GAA8C,UAAC,MAAM,EAAE,OAAO;IAChF,IAAI,CAAC,IAAA,6CAAe,EAAC,OAAO,EAAE,GAAG,CAAC,EAAE;QAChC,OAAO;KACV;IAED,IAAI,GAAoB,CAAC;IACzB,IAAI;QACA,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC/B;IAAC,WAAM;QACJ,GAAG,GAAG,SAAS,CAAC;KACnB;IAED,IACI,CAAC,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EACxC;QACE,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;KACpB;AACL,CAAC,CAAC;AAnBW,QAAA,SAAS,aAmBpB","sourcesContent":["import { isElementOfType } from 'roosterjs-content-model-dom';\nimport type { ContentModelHyperLinkFormat, FormatParser } from 'roosterjs-content-model-types';\n\nconst SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];\nconst INVALID_LINKS_REGEX = /^file:\\/\\/\\/[a-zA-Z\\/]/i;\n\n/**\n * @internal\n */\nexport const parseLink: FormatParser<ContentModelHyperLinkFormat> = (format, element) => {\n if (!isElementOfType(element, 'a')) {\n return;\n }\n\n let url: URL | undefined;\n try {\n url = new URL(element.href);\n } catch {\n url = undefined;\n }\n\n if (\n (url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) === -1) ||\n INVALID_LINKS_REGEX.test(element.href)\n ) {\n element.removeAttribute('href');\n format.href = '';\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"linkParser.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/linkParser.ts"],"names":[],"mappings":";;;AAAA,2EAA8D;AAG9D,IAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACjF,IAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAEtD;;GAEG;AACI,IAAM,SAAS,GAA8C,UAAC,MAAM,EAAE,OAAO;IAChF,IAAI,CAAC,IAAA,6CAAe,EAAC,OAAO,EAAE,GAAG,CAAC,EAAE;QAChC,OAAO;KACV;IAED,IAAI,GAAoB,CAAC;IACzB,IAAI;QACA,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC/B;IAAC,WAAM;QACJ,GAAG,GAAG,SAAS,CAAC;KACnB;IAED,IACI,CAAC,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EACxC;QACE,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;KACpB;AACL,CAAC,CAAC;AAnBW,QAAA,SAAS,aAmBpB","sourcesContent":["import { isElementOfType } from 'roosterjs-content-model-dom';\r\nimport type { ContentModelHyperLinkFormat, FormatParser } from 'roosterjs-content-model-types';\r\n\r\nconst SUPPORTED_PROTOCOLS = ['http:', 'https:', 'notes:', 'mailto:', 'onenote:'];\r\nconst INVALID_LINKS_REGEX = /^file:\\/\\/\\/[a-zA-Z\\/]/i;\r\n\r\n/**\r\n * @internal\r\n */\r\nexport const parseLink: FormatParser<ContentModelHyperLinkFormat> = (format, element) => {\r\n if (!isElementOfType(element, 'a')) {\r\n return;\r\n }\r\n\r\n let url: URL | undefined;\r\n try {\r\n url = new URL(element.href);\r\n } catch {\r\n url = undefined;\r\n }\r\n\r\n if (\r\n (url && SUPPORTED_PROTOCOLS.indexOf(url.protocol) === -1) ||\r\n INVALID_LINKS_REGEX.test(element.href)\r\n ) {\r\n element.removeAttribute('href');\r\n format.href = '';\r\n }\r\n};\r\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare function setProcessor<TKey extends keyof ElementProcessorMap>(domToModelOption: DomToModelOption, entry: TKey, processorOverride: Partial<ElementProcessorMap>[TKey]): void;
|
|
1
|
+
import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function setProcessor<TKey extends keyof ElementProcessorMap>(domToModelOption: DomToModelOption, entry: TKey, processorOverride: Partial<ElementProcessorMap>[TKey]): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setProcessor = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
function setProcessor(domToModelOption, entry, processorOverride) {
|
|
8
|
-
if (!domToModelOption.processorOverride) {
|
|
9
|
-
domToModelOption.processorOverride = {};
|
|
10
|
-
}
|
|
11
|
-
domToModelOption.processorOverride[entry] = processorOverride;
|
|
12
|
-
}
|
|
13
|
-
exports.setProcessor = setProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setProcessor = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
function setProcessor(domToModelOption, entry, processorOverride) {
|
|
8
|
+
if (!domToModelOption.processorOverride) {
|
|
9
|
+
domToModelOption.processorOverride = {};
|
|
10
|
+
}
|
|
11
|
+
domToModelOption.processorOverride[entry] = processorOverride;
|
|
12
|
+
}
|
|
13
|
+
exports.setProcessor = setProcessor;
|
|
14
14
|
//# sourceMappingURL=setProcessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setProcessor.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/setProcessor.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,SAAgB,YAAY,CACxB,gBAAkC,EAClC,KAAW,EACX,iBAAqD;IAErD,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;QACrC,gBAAgB,CAAC,iBAAiB,GAAG,EAAE,CAAC;KAC3C;IAED,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC;AAClE,CAAC;AAVD,oCAUC","sourcesContent":["import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport function setProcessor<TKey extends keyof ElementProcessorMap>(\n domToModelOption: DomToModelOption,\n entry: TKey,\n processorOverride: Partial<ElementProcessorMap>[TKey]\n) {\n if (!domToModelOption.processorOverride) {\n domToModelOption.processorOverride = {};\n }\n\n domToModelOption.processorOverride[entry] = processorOverride;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setProcessor.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-plugins/lib/paste/utils/setProcessor.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,SAAgB,YAAY,CACxB,gBAAkC,EAClC,KAAW,EACX,iBAAqD;IAErD,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;QACrC,gBAAgB,CAAC,iBAAiB,GAAG,EAAE,CAAC;KAC3C;IAED,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC;AAClE,CAAC;AAVD,oCAUC","sourcesContent":["import type { DomToModelOption, ElementProcessorMap } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function setProcessor<TKey extends keyof ElementProcessorMap>(\r\n domToModelOption: DomToModelOption,\r\n entry: TKey,\r\n processorOverride: Partial<ElementProcessorMap>[TKey]\r\n) {\r\n if (!domToModelOption.processorOverride) {\r\n domToModelOption.processorOverride = {};\r\n }\r\n\r\n domToModelOption.processorOverride[entry] = processorOverride;\r\n}\r\n"]}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import type { EditorPlugin, IEditor, PluginEvent } from 'roosterjs-editor-types';
|
|
2
|
-
/**
|
|
3
|
-
* ContentModel edit plugins helps editor to do editing operation on top of content model.
|
|
4
|
-
* This includes:
|
|
5
|
-
* 1. Delete Key
|
|
6
|
-
* 2. Backspace Key
|
|
7
|
-
*/
|
|
8
|
-
export declare class ContentModelEditPlugin implements EditorPlugin {
|
|
9
|
-
private editor;
|
|
10
|
-
/**
|
|
11
|
-
* Get name of this plugin
|
|
12
|
-
*/
|
|
13
|
-
getName(): string;
|
|
14
|
-
/**
|
|
15
|
-
* The first method that editor will call to a plugin when editor is initializing.
|
|
16
|
-
* It will pass in the editor instance, plugin should take this chance to save the
|
|
17
|
-
* editor reference so that it can call to any editor method or format API later.
|
|
18
|
-
* @param editor The editor object
|
|
19
|
-
*/
|
|
20
|
-
initialize(editor: IEditor): void;
|
|
21
|
-
/**
|
|
22
|
-
* The last method that editor will call to a plugin before it is disposed.
|
|
23
|
-
* Plugin can take this chance to clear the reference to editor. After this method is
|
|
24
|
-
* called, plugin should not call to any editor method since it will result in error.
|
|
25
|
-
*/
|
|
26
|
-
dispose(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Core method for a plugin. Once an event happens in editor, editor will call this
|
|
29
|
-
* method of each plugin to handle the event as long as the event is not handled
|
|
30
|
-
* exclusively by another plugin.
|
|
31
|
-
* @param event The event to handle:
|
|
32
|
-
*/
|
|
33
|
-
onPluginEvent(event: PluginEvent): void;
|
|
34
|
-
private handleKeyDownEvent;
|
|
35
|
-
}
|
|
1
|
+
import type { EditorPlugin, IEditor, PluginEvent } from 'roosterjs-editor-types';
|
|
2
|
+
/**
|
|
3
|
+
* ContentModel edit plugins helps editor to do editing operation on top of content model.
|
|
4
|
+
* This includes:
|
|
5
|
+
* 1. Delete Key
|
|
6
|
+
* 2. Backspace Key
|
|
7
|
+
*/
|
|
8
|
+
export declare class ContentModelEditPlugin implements EditorPlugin {
|
|
9
|
+
private editor;
|
|
10
|
+
/**
|
|
11
|
+
* Get name of this plugin
|
|
12
|
+
*/
|
|
13
|
+
getName(): string;
|
|
14
|
+
/**
|
|
15
|
+
* The first method that editor will call to a plugin when editor is initializing.
|
|
16
|
+
* It will pass in the editor instance, plugin should take this chance to save the
|
|
17
|
+
* editor reference so that it can call to any editor method or format API later.
|
|
18
|
+
* @param editor The editor object
|
|
19
|
+
*/
|
|
20
|
+
initialize(editor: IEditor): void;
|
|
21
|
+
/**
|
|
22
|
+
* The last method that editor will call to a plugin before it is disposed.
|
|
23
|
+
* Plugin can take this chance to clear the reference to editor. After this method is
|
|
24
|
+
* called, plugin should not call to any editor method since it will result in error.
|
|
25
|
+
*/
|
|
26
|
+
dispose(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Core method for a plugin. Once an event happens in editor, editor will call this
|
|
29
|
+
* method of each plugin to handle the event as long as the event is not handled
|
|
30
|
+
* exclusively by another plugin.
|
|
31
|
+
* @param event The event to handle:
|
|
32
|
+
*/
|
|
33
|
+
onPluginEvent(event: PluginEvent): void;
|
|
34
|
+
private handleKeyDownEvent;
|
|
35
|
+
}
|