roosterjs-content-model-api 9.45.0 → 9.45.2
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/index.d.ts +63 -63
- package/lib/index.js +131 -131
- package/lib/index.js.map +1 -1
- package/lib/modelApi/block/setModelAlignment.d.ts +5 -5
- package/lib/modelApi/block/setModelAlignment.js +65 -65
- package/lib/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib/modelApi/block/setModelDirection.d.ts +5 -5
- package/lib/modelApi/block/setModelDirection.js +113 -113
- package/lib/modelApi/block/setModelDirection.js.map +1 -1
- package/lib/modelApi/block/setModelIndentation.d.ts +8 -8
- package/lib/modelApi/block/setModelIndentation.js +158 -158
- package/lib/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib/modelApi/block/splitSelectedParagraphByBr.d.ts +7 -7
- package/lib/modelApi/block/splitSelectedParagraphByBr.js +71 -71
- package/lib/modelApi/block/splitSelectedParagraphByBr.js.map +1 -1
- package/lib/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib/modelApi/block/toggleModelBlockQuote.js +53 -53
- package/lib/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib/modelApi/common/adjustIndentation.d.ts +13 -13
- package/lib/modelApi/common/adjustIndentation.js +114 -114
- package/lib/modelApi/common/adjustIndentation.js.map +1 -1
- package/lib/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib/modelApi/common/clearModelFormat.js +143 -143
- package/lib/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib/modelApi/common/queryContentModelBlocks.d.ts +10 -10
- package/lib/modelApi/common/queryContentModelBlocks.js +87 -87
- package/lib/modelApi/common/queryContentModelBlocks.js.map +1 -1
- package/lib/modelApi/common/reducedModelChildProcessor.d.ts +20 -20
- package/lib/modelApi/common/reducedModelChildProcessor.js +63 -63
- package/lib/modelApi/common/reducedModelChildProcessor.js.map +1 -1
- package/lib/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib/modelApi/common/wrapBlock.js +52 -52
- package/lib/modelApi/common/wrapBlock.js.map +1 -1
- package/lib/modelApi/entity/insertEntityModel.d.ts +5 -5
- package/lib/modelApi/entity/insertEntityModel.js +105 -105
- package/lib/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib/modelApi/image/applyImageBorderFormat.d.ts +5 -5
- package/lib/modelApi/image/applyImageBorderFormat.js +57 -57
- package/lib/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib/modelApi/link/getLinkUrl.d.ts +5 -5
- package/lib/modelApi/link/getLinkUrl.js +28 -28
- package/lib/modelApi/link/getLinkUrl.js.map +1 -1
- package/lib/modelApi/link/matchLink.d.ts +12 -12
- package/lib/modelApi/link/matchLink.js +93 -93
- package/lib/modelApi/link/matchLink.js.map +1 -1
- package/lib/modelApi/link/promoteLink.d.ts +20 -20
- package/lib/modelApi/link/promoteLink.js +54 -54
- package/lib/modelApi/link/promoteLink.js.map +1 -1
- package/lib/modelApi/list/findListItemsInSameThread.d.ts +13 -13
- package/lib/modelApi/list/findListItemsInSameThread.js +113 -113
- package/lib/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib/modelApi/list/getListAnnounceData.d.ts +7 -7
- package/lib/modelApi/list/getListAnnounceData.js +68 -68
- package/lib/modelApi/list/getListAnnounceData.js.map +1 -1
- package/lib/modelApi/list/setListType.d.ts +8 -8
- package/lib/modelApi/list/setListType.js +121 -117
- package/lib/modelApi/list/setListType.js.map +1 -1
- package/lib/modelApi/list/setModelListStartNumber.d.ts +7 -7
- package/lib/modelApi/list/setModelListStartNumber.js +21 -21
- package/lib/modelApi/list/setModelListStartNumber.js.map +1 -1
- package/lib/modelApi/list/setModelListStyle.d.ts +7 -7
- package/lib/modelApi/list/setModelListStyle.js +25 -25
- package/lib/modelApi/list/setModelListStyle.js.map +1 -1
- package/lib/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
- package/lib/modelApi/selection/adjustSegmentSelection.js +47 -47
- package/lib/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.js +56 -56
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib/modelApi/selection/adjustWordSelection.d.ts +8 -8
- package/lib/modelApi/selection/adjustWordSelection.js +123 -123
- package/lib/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib/modelApi/selection/collapseTableSelection.d.ts +5 -5
- package/lib/modelApi/selection/collapseTableSelection.js +16 -16
- package/lib/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib/modelApi/table/alignTable.d.ts +5 -5
- package/lib/modelApi/table/alignTable.js +11 -11
- package/lib/modelApi/table/alignTable.js.map +1 -1
- package/lib/modelApi/table/alignTableCell.d.ts +9 -9
- package/lib/modelApi/table/alignTableCell.js +67 -57
- package/lib/modelApi/table/alignTableCell.js.map +1 -1
- package/lib/modelApi/table/canMergeCells.d.ts +5 -5
- package/lib/modelApi/table/canMergeCells.js +56 -56
- package/lib/modelApi/table/canMergeCells.js.map +1 -1
- package/lib/modelApi/table/clearSelectedCells.d.ts +7 -7
- package/lib/modelApi/table/clearSelectedCells.js +29 -29
- package/lib/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib/modelApi/table/copyPreviousCellSegmentFormat.d.ts +5 -0
- package/lib/modelApi/table/copyPreviousCellSegmentFormat.js +24 -0
- package/lib/modelApi/table/copyPreviousCellSegmentFormat.js.map +1 -0
- package/lib/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib/modelApi/table/createTableStructure.js +19 -19
- package/lib/modelApi/table/createTableStructure.js.map +1 -1
- package/lib/modelApi/table/deleteTable.d.ts +5 -5
- package/lib/modelApi/table/deleteTable.js +10 -10
- package/lib/modelApi/table/deleteTable.js.map +1 -1
- package/lib/modelApi/table/deleteTableColumn.d.ts +5 -5
- package/lib/modelApi/table/deleteTableColumn.js +24 -24
- package/lib/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib/modelApi/table/deleteTableRow.d.ts +5 -5
- package/lib/modelApi/table/deleteTableRow.js +23 -23
- package/lib/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
- package/lib/modelApi/table/ensureFocusableParagraphForTable.js +56 -56
- package/lib/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib/modelApi/table/insertTableColumn.d.ts +7 -7
- package/lib/modelApi/table/insertTableColumn.js +29 -27
- package/lib/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib/modelApi/table/insertTableRow.d.ts +7 -7
- package/lib/modelApi/table/insertTableRow.js +33 -31
- package/lib/modelApi/table/insertTableRow.js.map +1 -1
- package/lib/modelApi/table/mergeTableCells.d.ts +5 -5
- package/lib/modelApi/table/mergeTableCells.js +25 -25
- package/lib/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib/modelApi/table/mergeTableColumn.d.ts +5 -5
- package/lib/modelApi/table/mergeTableColumn.js +35 -35
- package/lib/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib/modelApi/table/mergeTableRow.d.ts +5 -5
- package/lib/modelApi/table/mergeTableRow.js +35 -35
- package/lib/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
- package/lib/modelApi/table/splitTableCellHorizontally.js +54 -54
- package/lib/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib/modelApi/table/splitTableCellVertically.d.ts +5 -5
- package/lib/modelApi/table/splitTableCellVertically.js +53 -53
- package/lib/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib/publicApi/block/setAlignment.d.ts +7 -7
- package/lib/publicApi/block/setAlignment.js +16 -16
- package/lib/publicApi/block/setAlignment.js.map +1 -1
- package/lib/publicApi/block/setDirection.d.ts +7 -7
- package/lib/publicApi/block/setDirection.js +16 -16
- package/lib/publicApi/block/setDirection.js.map +1 -1
- package/lib/publicApi/block/setHeadingLevel.d.ts +7 -7
- package/lib/publicApi/block/setHeadingLevel.js +50 -50
- package/lib/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib/publicApi/block/setIndentation.d.ts +8 -8
- package/lib/publicApi/block/setIndentation.js +21 -21
- package/lib/publicApi/block/setIndentation.js.map +1 -1
- package/lib/publicApi/block/setParagraphMargin.d.ts +9 -9
- package/lib/publicApi/block/setParagraphMargin.js +33 -33
- package/lib/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib/publicApi/block/setSpacing.d.ts +7 -7
- package/lib/publicApi/block/setSpacing.js +21 -21
- package/lib/publicApi/block/setSpacing.js.map +1 -1
- package/lib/publicApi/block/toggleBlockQuote.d.ts +9 -9
- package/lib/publicApi/block/toggleBlockQuote.js +39 -39
- package/lib/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib/publicApi/entity/insertEntity.d.ts +25 -25
- package/lib/publicApi/entity/insertEntity.js +67 -67
- package/lib/publicApi/entity/insertEntity.js.map +1 -1
- package/lib/publicApi/format/clearFormat.d.ts +6 -6
- package/lib/publicApi/format/clearFormat.js +34 -34
- package/lib/publicApi/format/clearFormat.js.map +1 -1
- package/lib/publicApi/format/getFormatState.d.ts +7 -7
- package/lib/publicApi/format/getFormatState.js +31 -31
- package/lib/publicApi/format/getFormatState.js.map +1 -1
- package/lib/publicApi/image/adjustImageSelection.d.ts +6 -6
- package/lib/publicApi/image/adjustImageSelection.js +29 -29
- package/lib/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib/publicApi/image/changeImage.d.ts +7 -7
- package/lib/publicApi/image/changeImage.js +35 -35
- package/lib/publicApi/image/changeImage.js.map +1 -1
- package/lib/publicApi/image/insertImage.d.ts +7 -7
- package/lib/publicApi/image/insertImage.js +38 -38
- package/lib/publicApi/image/insertImage.js.map +1 -1
- package/lib/publicApi/image/setImageAltText.d.ts +8 -8
- package/lib/publicApi/image/setImageAltText.js +17 -17
- package/lib/publicApi/image/setImageAltText.js.map +1 -1
- package/lib/publicApi/image/setImageBorder.d.ts +9 -9
- package/lib/publicApi/image/setImageBorder.js +19 -19
- package/lib/publicApi/image/setImageBorder.js.map +1 -1
- package/lib/publicApi/image/setImageBoxShadow.d.ts +8 -8
- package/lib/publicApi/image/setImageBoxShadow.js +29 -29
- package/lib/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib/publicApi/link/adjustLinkSelection.d.ts +6 -6
- package/lib/publicApi/link/adjustLinkSelection.js +34 -34
- package/lib/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib/publicApi/link/insertLink.d.ts +15 -15
- package/lib/publicApi/link/insertLink.js +120 -120
- package/lib/publicApi/link/insertLink.js.map +1 -1
- package/lib/publicApi/link/removeLink.d.ts +8 -8
- package/lib/publicApi/link/removeLink.js +32 -32
- package/lib/publicApi/link/removeLink.js.map +1 -1
- package/lib/publicApi/list/setListStartNumber.d.ts +7 -7
- package/lib/publicApi/list/setListStartNumber.js +18 -18
- package/lib/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib/publicApi/list/setListStyle.d.ts +7 -7
- package/lib/publicApi/list/setListStyle.js +18 -18
- package/lib/publicApi/list/setListStyle.js.map +1 -1
- package/lib/publicApi/list/toggleBullet.d.ts +9 -9
- package/lib/publicApi/list/toggleBullet.js +22 -22
- package/lib/publicApi/list/toggleBullet.js.map +1 -1
- package/lib/publicApi/list/toggleNumbering.d.ts +9 -9
- package/lib/publicApi/list/toggleNumbering.js +22 -22
- package/lib/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib/publicApi/segment/applySegmentFormat.d.ts +7 -7
- package/lib/publicApi/segment/applySegmentFormat.js +23 -23
- package/lib/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib/publicApi/segment/changeCapitalization.d.ts +10 -10
- package/lib/publicApi/segment/changeCapitalization.js +49 -49
- package/lib/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib/publicApi/segment/changeFontSize.js +63 -63
- package/lib/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib/publicApi/segment/setBackgroundColor.d.ts +7 -7
- package/lib/publicApi/segment/setBackgroundColor.js +35 -35
- package/lib/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib/publicApi/segment/setFontName.d.ts +7 -7
- package/lib/publicApi/segment/setFontName.js +19 -19
- package/lib/publicApi/segment/setFontName.js.map +1 -1
- package/lib/publicApi/segment/setFontSize.d.ts +12 -12
- package/lib/publicApi/segment/setFontSize.js +33 -33
- package/lib/publicApi/segment/setFontSize.js.map +1 -1
- package/lib/publicApi/segment/setTextColor.d.ts +7 -7
- package/lib/publicApi/segment/setTextColor.js +26 -26
- package/lib/publicApi/segment/setTextColor.js.map +1 -1
- package/lib/publicApi/segment/splitTextSegment.d.ts +10 -10
- package/lib/publicApi/segment/splitTextSegment.js +30 -30
- package/lib/publicApi/segment/splitTextSegment.js.map +1 -1
- package/lib/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib/publicApi/segment/toggleBold.js +27 -27
- package/lib/publicApi/segment/toggleBold.js.map +1 -1
- package/lib/publicApi/segment/toggleCode.d.ts +6 -6
- package/lib/publicApi/segment/toggleCode.js +28 -28
- package/lib/publicApi/segment/toggleCode.js.map +1 -1
- package/lib/publicApi/segment/toggleItalic.d.ts +6 -6
- package/lib/publicApi/segment/toggleItalic.js +21 -21
- package/lib/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib/publicApi/segment/toggleStrikethrough.d.ts +6 -6
- package/lib/publicApi/segment/toggleStrikethrough.js +15 -15
- package/lib/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib/publicApi/segment/toggleSubscript.d.ts +6 -6
- package/lib/publicApi/segment/toggleSubscript.js +15 -15
- package/lib/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib/publicApi/segment/toggleSuperscript.d.ts +6 -6
- package/lib/publicApi/segment/toggleSuperscript.js +15 -15
- package/lib/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib/publicApi/segment/toggleUnderline.d.ts +6 -6
- package/lib/publicApi/segment/toggleUnderline.js +24 -24
- package/lib/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib/publicApi/table/applyTableBorderFormat.d.ts +8 -8
- package/lib/publicApi/table/applyTableBorderFormat.js +297 -297
- package/lib/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib/publicApi/table/editTable.d.ts +7 -7
- package/lib/publicApi/table/editTable.js +95 -95
- package/lib/publicApi/table/editTable.js.map +1 -1
- package/lib/publicApi/table/formatTable.d.ts +8 -8
- package/lib/publicApi/table/formatTable.js +38 -38
- package/lib/publicApi/table/formatTable.js.map +1 -1
- package/lib/publicApi/table/insertTable.d.ts +12 -12
- package/lib/publicApi/table/insertTable.js +76 -76
- package/lib/publicApi/table/insertTable.js.map +1 -1
- package/lib/publicApi/table/setTableCellShade.d.ts +7 -7
- package/lib/publicApi/table/setTableCellShade.js +32 -32
- package/lib/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib/publicApi/utils/createEditorContextForEntity.d.ts +8 -8
- package/lib/publicApi/utils/createEditorContextForEntity.js +29 -29
- package/lib/publicApi/utils/createEditorContextForEntity.js.map +1 -1
- package/lib/publicApi/utils/formatImageWithContentModel.d.ts +8 -8
- package/lib/publicApi/utils/formatImageWithContentModel.js +18 -18
- package/lib/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatInsertPointWithContentModel.d.ts +9 -9
- package/lib/publicApi/utils/formatInsertPointWithContentModel.js +130 -130
- package/lib/publicApi/utils/formatInsertPointWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatParagraphWithContentModel.d.ts +8 -8
- package/lib/publicApi/utils/formatParagraphWithContentModel.js +23 -23
- package/lib/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatSegmentWithContentModel.d.ts +11 -11
- package/lib/publicApi/utils/formatSegmentWithContentModel.js +117 -117
- package/lib/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
- package/lib/publicApi/utils/formatTableWithContentModel.js +46 -46
- package/lib/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatTextSegmentBeforeSelectionMarker.d.ts +8 -8
- package/lib/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js +34 -34
- package/lib/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js.map +1 -1
- package/lib-amd/index.d.ts +63 -63
- package/lib-amd/index.js +69 -69
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/modelApi/block/setModelAlignment.d.ts +5 -5
- package/lib-amd/modelApi/block/setModelAlignment.js +64 -64
- package/lib-amd/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib-amd/modelApi/block/setModelDirection.d.ts +5 -5
- package/lib-amd/modelApi/block/setModelDirection.js +112 -112
- package/lib-amd/modelApi/block/setModelDirection.js.map +1 -1
- package/lib-amd/modelApi/block/setModelIndentation.d.ts +8 -8
- package/lib-amd/modelApi/block/setModelIndentation.js +154 -154
- package/lib-amd/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-amd/modelApi/block/splitSelectedParagraphByBr.d.ts +7 -7
- package/lib-amd/modelApi/block/splitSelectedParagraphByBr.js +71 -71
- package/lib-amd/modelApi/block/splitSelectedParagraphByBr.js.map +1 -1
- package/lib-amd/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js +52 -52
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-amd/modelApi/common/adjustIndentation.d.ts +13 -13
- package/lib-amd/modelApi/common/adjustIndentation.js +114 -114
- package/lib-amd/modelApi/common/adjustIndentation.js.map +1 -1
- package/lib-amd/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib-amd/modelApi/common/clearModelFormat.js +142 -142
- package/lib-amd/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-amd/modelApi/common/queryContentModelBlocks.d.ts +10 -10
- package/lib-amd/modelApi/common/queryContentModelBlocks.js +87 -87
- package/lib-amd/modelApi/common/queryContentModelBlocks.js.map +1 -1
- package/lib-amd/modelApi/common/reducedModelChildProcessor.d.ts +20 -20
- package/lib-amd/modelApi/common/reducedModelChildProcessor.js +63 -63
- package/lib-amd/modelApi/common/reducedModelChildProcessor.js.map +1 -1
- package/lib-amd/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib-amd/modelApi/common/wrapBlock.js +52 -52
- package/lib-amd/modelApi/common/wrapBlock.js.map +1 -1
- package/lib-amd/modelApi/entity/insertEntityModel.d.ts +5 -5
- package/lib-amd/modelApi/entity/insertEntityModel.js +105 -105
- package/lib-amd/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib-amd/modelApi/image/applyImageBorderFormat.d.ts +5 -5
- package/lib-amd/modelApi/image/applyImageBorderFormat.js +58 -58
- package/lib-amd/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-amd/modelApi/link/getLinkUrl.d.ts +5 -5
- package/lib-amd/modelApi/link/getLinkUrl.js +29 -29
- package/lib-amd/modelApi/link/getLinkUrl.js.map +1 -1
- package/lib-amd/modelApi/link/matchLink.d.ts +12 -12
- package/lib-amd/modelApi/link/matchLink.js +93 -93
- package/lib-amd/modelApi/link/matchLink.js.map +1 -1
- package/lib-amd/modelApi/link/promoteLink.d.ts +20 -20
- package/lib-amd/modelApi/link/promoteLink.js +54 -54
- package/lib-amd/modelApi/link/promoteLink.js.map +1 -1
- package/lib-amd/modelApi/list/findListItemsInSameThread.d.ts +13 -13
- package/lib-amd/modelApi/list/findListItemsInSameThread.js +115 -115
- package/lib-amd/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-amd/modelApi/list/getListAnnounceData.d.ts +7 -7
- package/lib-amd/modelApi/list/getListAnnounceData.js +68 -68
- package/lib-amd/modelApi/list/getListAnnounceData.js.map +1 -1
- package/lib-amd/modelApi/list/setListType.d.ts +8 -8
- package/lib-amd/modelApi/list/setListType.js +120 -116
- package/lib-amd/modelApi/list/setListType.js.map +1 -1
- package/lib-amd/modelApi/list/setModelListStartNumber.d.ts +7 -7
- package/lib-amd/modelApi/list/setModelListStartNumber.js +22 -22
- package/lib-amd/modelApi/list/setModelListStartNumber.js.map +1 -1
- package/lib-amd/modelApi/list/setModelListStyle.d.ts +7 -7
- package/lib-amd/modelApi/list/setModelListStyle.js +25 -25
- package/lib-amd/modelApi/list/setModelListStyle.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
- package/lib-amd/modelApi/selection/adjustSegmentSelection.js +48 -48
- package/lib-amd/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js +56 -56
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustWordSelection.d.ts +8 -8
- package/lib-amd/modelApi/selection/adjustWordSelection.js +123 -123
- package/lib-amd/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/collapseTableSelection.d.ts +5 -5
- package/lib-amd/modelApi/selection/collapseTableSelection.js +17 -17
- package/lib-amd/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib-amd/modelApi/table/alignTable.d.ts +5 -5
- package/lib-amd/modelApi/table/alignTable.js +13 -13
- package/lib-amd/modelApi/table/alignTable.js.map +1 -1
- package/lib-amd/modelApi/table/alignTableCell.d.ts +9 -9
- package/lib-amd/modelApi/table/alignTableCell.js +68 -58
- package/lib-amd/modelApi/table/alignTableCell.js.map +1 -1
- package/lib-amd/modelApi/table/canMergeCells.d.ts +5 -5
- package/lib-amd/modelApi/table/canMergeCells.js +58 -58
- package/lib-amd/modelApi/table/canMergeCells.js.map +1 -1
- package/lib-amd/modelApi/table/clearSelectedCells.d.ts +7 -7
- package/lib-amd/modelApi/table/clearSelectedCells.js +30 -30
- package/lib-amd/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib-amd/modelApi/table/copyPreviousCellSegmentFormat.d.ts +5 -0
- package/lib-amd/modelApi/table/copyPreviousCellSegmentFormat.js +25 -0
- package/lib-amd/modelApi/table/copyPreviousCellSegmentFormat.js.map +1 -0
- package/lib-amd/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib-amd/modelApi/table/createTableStructure.js +20 -20
- package/lib-amd/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTable.d.ts +5 -5
- package/lib-amd/modelApi/table/deleteTable.js +12 -12
- package/lib-amd/modelApi/table/deleteTable.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTableColumn.d.ts +5 -5
- package/lib-amd/modelApi/table/deleteTableColumn.js +24 -24
- package/lib-amd/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTableRow.d.ts +5 -5
- package/lib-amd/modelApi/table/deleteTableRow.js +23 -23
- package/lib-amd/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js +57 -57
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib-amd/modelApi/table/insertTableColumn.d.ts +7 -7
- package/lib-amd/modelApi/table/insertTableColumn.js +28 -27
- package/lib-amd/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/insertTableRow.d.ts +7 -7
- package/lib-amd/modelApi/table/insertTableRow.js +31 -30
- package/lib-amd/modelApi/table/insertTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableCells.d.ts +5 -5
- package/lib-amd/modelApi/table/mergeTableCells.js +25 -25
- package/lib-amd/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableColumn.d.ts +5 -5
- package/lib-amd/modelApi/table/mergeTableColumn.js +35 -35
- package/lib-amd/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableRow.d.ts +5 -5
- package/lib-amd/modelApi/table/mergeTableRow.js +35 -35
- package/lib-amd/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
- package/lib-amd/modelApi/table/splitTableCellHorizontally.js +54 -54
- package/lib-amd/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib-amd/modelApi/table/splitTableCellVertically.d.ts +5 -5
- package/lib-amd/modelApi/table/splitTableCellVertically.js +53 -53
- package/lib-amd/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib-amd/publicApi/block/setAlignment.d.ts +7 -7
- package/lib-amd/publicApi/block/setAlignment.js +17 -17
- package/lib-amd/publicApi/block/setAlignment.js.map +1 -1
- package/lib-amd/publicApi/block/setDirection.d.ts +7 -7
- package/lib-amd/publicApi/block/setDirection.js +17 -17
- package/lib-amd/publicApi/block/setDirection.js.map +1 -1
- package/lib-amd/publicApi/block/setHeadingLevel.d.ts +7 -7
- package/lib-amd/publicApi/block/setHeadingLevel.js +51 -51
- package/lib-amd/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib-amd/publicApi/block/setIndentation.d.ts +8 -8
- package/lib-amd/publicApi/block/setIndentation.js +22 -22
- package/lib-amd/publicApi/block/setIndentation.js.map +1 -1
- package/lib-amd/publicApi/block/setParagraphMargin.d.ts +9 -9
- package/lib-amd/publicApi/block/setParagraphMargin.js +33 -33
- package/lib-amd/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib-amd/publicApi/block/setSpacing.d.ts +7 -7
- package/lib-amd/publicApi/block/setSpacing.js +22 -22
- package/lib-amd/publicApi/block/setSpacing.js.map +1 -1
- package/lib-amd/publicApi/block/toggleBlockQuote.d.ts +9 -9
- package/lib-amd/publicApi/block/toggleBlockQuote.js +39 -39
- package/lib-amd/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib-amd/publicApi/entity/insertEntity.d.ts +25 -25
- package/lib-amd/publicApi/entity/insertEntity.js +66 -66
- package/lib-amd/publicApi/entity/insertEntity.js.map +1 -1
- package/lib-amd/publicApi/format/clearFormat.d.ts +6 -6
- package/lib-amd/publicApi/format/clearFormat.js +34 -34
- package/lib-amd/publicApi/format/clearFormat.js.map +1 -1
- package/lib-amd/publicApi/format/getFormatState.d.ts +7 -7
- package/lib-amd/publicApi/format/getFormatState.js +31 -31
- package/lib-amd/publicApi/format/getFormatState.js.map +1 -1
- package/lib-amd/publicApi/image/adjustImageSelection.d.ts +6 -6
- package/lib-amd/publicApi/image/adjustImageSelection.js +29 -29
- package/lib-amd/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib-amd/publicApi/image/changeImage.d.ts +7 -7
- package/lib-amd/publicApi/image/changeImage.js +35 -35
- package/lib-amd/publicApi/image/changeImage.js.map +1 -1
- package/lib-amd/publicApi/image/insertImage.d.ts +7 -7
- package/lib-amd/publicApi/image/insertImage.js +39 -39
- package/lib-amd/publicApi/image/insertImage.js.map +1 -1
- package/lib-amd/publicApi/image/setImageAltText.d.ts +8 -8
- package/lib-amd/publicApi/image/setImageAltText.js +18 -18
- package/lib-amd/publicApi/image/setImageAltText.js.map +1 -1
- package/lib-amd/publicApi/image/setImageBorder.d.ts +9 -9
- package/lib-amd/publicApi/image/setImageBorder.js +19 -19
- package/lib-amd/publicApi/image/setImageBorder.js.map +1 -1
- package/lib-amd/publicApi/image/setImageBoxShadow.d.ts +8 -8
- package/lib-amd/publicApi/image/setImageBoxShadow.js +30 -30
- package/lib-amd/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib-amd/publicApi/link/adjustLinkSelection.d.ts +6 -6
- package/lib-amd/publicApi/link/adjustLinkSelection.js +33 -33
- package/lib-amd/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib-amd/publicApi/link/insertLink.d.ts +15 -15
- package/lib-amd/publicApi/link/insertLink.js +118 -118
- package/lib-amd/publicApi/link/insertLink.js.map +1 -1
- package/lib-amd/publicApi/link/removeLink.d.ts +8 -8
- package/lib-amd/publicApi/link/removeLink.js +32 -32
- package/lib-amd/publicApi/link/removeLink.js.map +1 -1
- package/lib-amd/publicApi/list/setListStartNumber.d.ts +7 -7
- package/lib-amd/publicApi/list/setListStartNumber.js +19 -19
- package/lib-amd/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib-amd/publicApi/list/setListStyle.d.ts +7 -7
- package/lib-amd/publicApi/list/setListStyle.js +19 -19
- package/lib-amd/publicApi/list/setListStyle.js.map +1 -1
- package/lib-amd/publicApi/list/toggleBullet.d.ts +9 -9
- package/lib-amd/publicApi/list/toggleBullet.js +23 -23
- package/lib-amd/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-amd/publicApi/list/toggleNumbering.d.ts +9 -9
- package/lib-amd/publicApi/list/toggleNumbering.js +23 -23
- package/lib-amd/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib-amd/publicApi/segment/applySegmentFormat.d.ts +7 -7
- package/lib-amd/publicApi/segment/applySegmentFormat.js +24 -24
- package/lib-amd/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib-amd/publicApi/segment/changeCapitalization.d.ts +10 -10
- package/lib-amd/publicApi/segment/changeCapitalization.js +50 -50
- package/lib-amd/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib-amd/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib-amd/publicApi/segment/changeFontSize.js +62 -62
- package/lib-amd/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib-amd/publicApi/segment/setBackgroundColor.d.ts +7 -7
- package/lib-amd/publicApi/segment/setBackgroundColor.js +35 -35
- package/lib-amd/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib-amd/publicApi/segment/setFontName.d.ts +7 -7
- package/lib-amd/publicApi/segment/setFontName.js +20 -20
- package/lib-amd/publicApi/segment/setFontName.js.map +1 -1
- package/lib-amd/publicApi/segment/setFontSize.d.ts +12 -12
- package/lib-amd/publicApi/segment/setFontSize.js +34 -34
- package/lib-amd/publicApi/segment/setFontSize.js.map +1 -1
- package/lib-amd/publicApi/segment/setTextColor.d.ts +7 -7
- package/lib-amd/publicApi/segment/setTextColor.js +27 -27
- package/lib-amd/publicApi/segment/setTextColor.js.map +1 -1
- package/lib-amd/publicApi/segment/splitTextSegment.d.ts +10 -10
- package/lib-amd/publicApi/segment/splitTextSegment.js +30 -30
- package/lib-amd/publicApi/segment/splitTextSegment.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleBold.js +27 -27
- package/lib-amd/publicApi/segment/toggleBold.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleCode.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleCode.js +28 -28
- package/lib-amd/publicApi/segment/toggleCode.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleItalic.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleItalic.js +22 -22
- package/lib-amd/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleStrikethrough.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleStrikethrough.js +16 -16
- package/lib-amd/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleSubscript.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleSubscript.js +16 -16
- package/lib-amd/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleSuperscript.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleSuperscript.js +16 -16
- package/lib-amd/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleUnderline.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleUnderline.js +25 -25
- package/lib-amd/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib-amd/publicApi/table/applyTableBorderFormat.d.ts +8 -8
- package/lib-amd/publicApi/table/applyTableBorderFormat.js +297 -297
- package/lib-amd/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib-amd/publicApi/table/editTable.d.ts +7 -7
- package/lib-amd/publicApi/table/editTable.js +84 -84
- package/lib-amd/publicApi/table/editTable.js.map +1 -1
- package/lib-amd/publicApi/table/formatTable.d.ts +8 -8
- package/lib-amd/publicApi/table/formatTable.js +38 -38
- package/lib-amd/publicApi/table/formatTable.js.map +1 -1
- package/lib-amd/publicApi/table/insertTable.d.ts +12 -12
- package/lib-amd/publicApi/table/insertTable.js +74 -74
- package/lib-amd/publicApi/table/insertTable.js.map +1 -1
- package/lib-amd/publicApi/table/setTableCellShade.d.ts +7 -7
- package/lib-amd/publicApi/table/setTableCellShade.js +32 -32
- package/lib-amd/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib-amd/publicApi/utils/createEditorContextForEntity.d.ts +8 -8
- package/lib-amd/publicApi/utils/createEditorContextForEntity.js +30 -30
- package/lib-amd/publicApi/utils/createEditorContextForEntity.js.map +1 -1
- package/lib-amd/publicApi/utils/formatImageWithContentModel.d.ts +8 -8
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js +19 -19
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatInsertPointWithContentModel.d.ts +9 -9
- package/lib-amd/publicApi/utils/formatInsertPointWithContentModel.js +130 -130
- package/lib-amd/publicApi/utils/formatInsertPointWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.d.ts +8 -8
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js +23 -23
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.d.ts +11 -11
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js +115 -115
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js +45 -45
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatTextSegmentBeforeSelectionMarker.d.ts +8 -8
- package/lib-amd/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js +35 -35
- package/lib-amd/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js.map +1 -1
- package/lib-mjs/index.d.ts +63 -63
- package/lib-mjs/index.js +63 -63
- package/lib-mjs/index.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelAlignment.d.ts +5 -5
- package/lib-mjs/modelApi/block/setModelAlignment.js +61 -61
- package/lib-mjs/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelDirection.d.ts +5 -5
- package/lib-mjs/modelApi/block/setModelDirection.js +109 -109
- package/lib-mjs/modelApi/block/setModelDirection.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelIndentation.d.ts +8 -8
- package/lib-mjs/modelApi/block/setModelIndentation.js +154 -154
- package/lib-mjs/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-mjs/modelApi/block/splitSelectedParagraphByBr.d.ts +7 -7
- package/lib-mjs/modelApi/block/splitSelectedParagraphByBr.js +67 -67
- package/lib-mjs/modelApi/block/splitSelectedParagraphByBr.js.map +1 -1
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js +49 -49
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-mjs/modelApi/common/adjustIndentation.d.ts +13 -13
- package/lib-mjs/modelApi/common/adjustIndentation.js +109 -109
- package/lib-mjs/modelApi/common/adjustIndentation.js.map +1 -1
- package/lib-mjs/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib-mjs/modelApi/common/clearModelFormat.js +139 -139
- package/lib-mjs/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-mjs/modelApi/common/queryContentModelBlocks.d.ts +10 -10
- package/lib-mjs/modelApi/common/queryContentModelBlocks.js +83 -83
- package/lib-mjs/modelApi/common/queryContentModelBlocks.js.map +1 -1
- package/lib-mjs/modelApi/common/reducedModelChildProcessor.d.ts +20 -20
- package/lib-mjs/modelApi/common/reducedModelChildProcessor.js +59 -59
- package/lib-mjs/modelApi/common/reducedModelChildProcessor.js.map +1 -1
- package/lib-mjs/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib-mjs/modelApi/common/wrapBlock.js +47 -47
- package/lib-mjs/modelApi/common/wrapBlock.js.map +1 -1
- package/lib-mjs/modelApi/entity/insertEntityModel.d.ts +5 -5
- package/lib-mjs/modelApi/entity/insertEntityModel.js +101 -101
- package/lib-mjs/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib-mjs/modelApi/image/applyImageBorderFormat.d.ts +5 -5
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js +53 -53
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-mjs/modelApi/link/getLinkUrl.d.ts +5 -5
- package/lib-mjs/modelApi/link/getLinkUrl.js +24 -24
- package/lib-mjs/modelApi/link/getLinkUrl.js.map +1 -1
- package/lib-mjs/modelApi/link/matchLink.d.ts +12 -12
- package/lib-mjs/modelApi/link/matchLink.js +89 -89
- package/lib-mjs/modelApi/link/matchLink.js.map +1 -1
- package/lib-mjs/modelApi/link/promoteLink.d.ts +20 -20
- package/lib-mjs/modelApi/link/promoteLink.js +49 -49
- package/lib-mjs/modelApi/link/promoteLink.js.map +1 -1
- package/lib-mjs/modelApi/list/findListItemsInSameThread.d.ts +13 -13
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js +109 -109
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-mjs/modelApi/list/getListAnnounceData.d.ts +7 -7
- package/lib-mjs/modelApi/list/getListAnnounceData.js +64 -64
- package/lib-mjs/modelApi/list/getListAnnounceData.js.map +1 -1
- package/lib-mjs/modelApi/list/setListType.d.ts +8 -8
- package/lib-mjs/modelApi/list/setListType.js +117 -113
- package/lib-mjs/modelApi/list/setListType.js.map +1 -1
- package/lib-mjs/modelApi/list/setModelListStartNumber.d.ts +7 -7
- package/lib-mjs/modelApi/list/setModelListStartNumber.js +17 -17
- package/lib-mjs/modelApi/list/setModelListStartNumber.js.map +1 -1
- package/lib-mjs/modelApi/list/setModelListStyle.d.ts +7 -7
- package/lib-mjs/modelApi/list/setModelListStyle.js +21 -21
- package/lib-mjs/modelApi/list/setModelListStyle.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.js +43 -43
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js +52 -52
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustWordSelection.d.ts +8 -8
- package/lib-mjs/modelApi/selection/adjustWordSelection.js +119 -119
- package/lib-mjs/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/collapseTableSelection.d.ts +5 -5
- package/lib-mjs/modelApi/selection/collapseTableSelection.js +12 -12
- package/lib-mjs/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib-mjs/modelApi/table/alignTable.d.ts +5 -5
- package/lib-mjs/modelApi/table/alignTable.js +7 -7
- package/lib-mjs/modelApi/table/alignTable.js.map +1 -1
- package/lib-mjs/modelApi/table/alignTableCell.d.ts +9 -9
- package/lib-mjs/modelApi/table/alignTableCell.js +62 -52
- package/lib-mjs/modelApi/table/alignTableCell.js.map +1 -1
- package/lib-mjs/modelApi/table/canMergeCells.d.ts +5 -5
- package/lib-mjs/modelApi/table/canMergeCells.js +52 -52
- package/lib-mjs/modelApi/table/canMergeCells.js.map +1 -1
- package/lib-mjs/modelApi/table/clearSelectedCells.d.ts +7 -7
- package/lib-mjs/modelApi/table/clearSelectedCells.js +25 -25
- package/lib-mjs/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib-mjs/modelApi/table/copyPreviousCellSegmentFormat.d.ts +5 -0
- package/lib-mjs/modelApi/table/copyPreviousCellSegmentFormat.js +20 -0
- package/lib-mjs/modelApi/table/copyPreviousCellSegmentFormat.js.map +1 -0
- package/lib-mjs/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib-mjs/modelApi/table/createTableStructure.js +15 -15
- package/lib-mjs/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTable.d.ts +5 -5
- package/lib-mjs/modelApi/table/deleteTable.js +6 -6
- package/lib-mjs/modelApi/table/deleteTable.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTableColumn.d.ts +5 -5
- package/lib-mjs/modelApi/table/deleteTableColumn.js +20 -20
- package/lib-mjs/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTableRow.d.ts +5 -5
- package/lib-mjs/modelApi/table/deleteTableRow.js +19 -19
- package/lib-mjs/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js +52 -52
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib-mjs/modelApi/table/insertTableColumn.d.ts +7 -7
- package/lib-mjs/modelApi/table/insertTableColumn.js +25 -23
- package/lib-mjs/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/insertTableRow.d.ts +7 -7
- package/lib-mjs/modelApi/table/insertTableRow.js +29 -27
- package/lib-mjs/modelApi/table/insertTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableCells.d.ts +5 -5
- package/lib-mjs/modelApi/table/mergeTableCells.js +21 -21
- package/lib-mjs/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableColumn.d.ts +5 -5
- package/lib-mjs/modelApi/table/mergeTableColumn.js +31 -31
- package/lib-mjs/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableRow.d.ts +5 -5
- package/lib-mjs/modelApi/table/mergeTableRow.js +31 -31
- package/lib-mjs/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.js +50 -50
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib-mjs/modelApi/table/splitTableCellVertically.d.ts +5 -5
- package/lib-mjs/modelApi/table/splitTableCellVertically.js +49 -49
- package/lib-mjs/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib-mjs/publicApi/block/setAlignment.d.ts +7 -7
- package/lib-mjs/publicApi/block/setAlignment.js +12 -12
- package/lib-mjs/publicApi/block/setAlignment.js.map +1 -1
- package/lib-mjs/publicApi/block/setDirection.d.ts +7 -7
- package/lib-mjs/publicApi/block/setDirection.js +12 -12
- package/lib-mjs/publicApi/block/setDirection.js.map +1 -1
- package/lib-mjs/publicApi/block/setHeadingLevel.d.ts +7 -7
- package/lib-mjs/publicApi/block/setHeadingLevel.js +46 -46
- package/lib-mjs/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib-mjs/publicApi/block/setIndentation.d.ts +8 -8
- package/lib-mjs/publicApi/block/setIndentation.js +17 -17
- package/lib-mjs/publicApi/block/setIndentation.js.map +1 -1
- package/lib-mjs/publicApi/block/setParagraphMargin.d.ts +9 -9
- package/lib-mjs/publicApi/block/setParagraphMargin.js +29 -29
- package/lib-mjs/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib-mjs/publicApi/block/setSpacing.d.ts +7 -7
- package/lib-mjs/publicApi/block/setSpacing.js +17 -17
- package/lib-mjs/publicApi/block/setSpacing.js.map +1 -1
- package/lib-mjs/publicApi/block/toggleBlockQuote.d.ts +9 -9
- package/lib-mjs/publicApi/block/toggleBlockQuote.js +35 -35
- package/lib-mjs/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib-mjs/publicApi/entity/insertEntity.d.ts +25 -25
- package/lib-mjs/publicApi/entity/insertEntity.js +63 -63
- package/lib-mjs/publicApi/entity/insertEntity.js.map +1 -1
- package/lib-mjs/publicApi/format/clearFormat.d.ts +6 -6
- package/lib-mjs/publicApi/format/clearFormat.js +30 -30
- package/lib-mjs/publicApi/format/clearFormat.js.map +1 -1
- package/lib-mjs/publicApi/format/getFormatState.d.ts +7 -7
- package/lib-mjs/publicApi/format/getFormatState.js +27 -27
- package/lib-mjs/publicApi/format/getFormatState.js.map +1 -1
- package/lib-mjs/publicApi/image/adjustImageSelection.d.ts +6 -6
- package/lib-mjs/publicApi/image/adjustImageSelection.js +25 -25
- package/lib-mjs/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib-mjs/publicApi/image/changeImage.d.ts +7 -7
- package/lib-mjs/publicApi/image/changeImage.js +31 -31
- package/lib-mjs/publicApi/image/changeImage.js.map +1 -1
- package/lib-mjs/publicApi/image/insertImage.d.ts +7 -7
- package/lib-mjs/publicApi/image/insertImage.js +34 -34
- package/lib-mjs/publicApi/image/insertImage.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageAltText.d.ts +8 -8
- package/lib-mjs/publicApi/image/setImageAltText.js +13 -13
- package/lib-mjs/publicApi/image/setImageAltText.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageBorder.d.ts +9 -9
- package/lib-mjs/publicApi/image/setImageBorder.js +15 -15
- package/lib-mjs/publicApi/image/setImageBorder.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageBoxShadow.d.ts +8 -8
- package/lib-mjs/publicApi/image/setImageBoxShadow.js +25 -25
- package/lib-mjs/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib-mjs/publicApi/link/adjustLinkSelection.d.ts +6 -6
- package/lib-mjs/publicApi/link/adjustLinkSelection.js +30 -30
- package/lib-mjs/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib-mjs/publicApi/link/insertLink.d.ts +15 -15
- package/lib-mjs/publicApi/link/insertLink.js +116 -116
- package/lib-mjs/publicApi/link/insertLink.js.map +1 -1
- package/lib-mjs/publicApi/link/removeLink.d.ts +8 -8
- package/lib-mjs/publicApi/link/removeLink.js +28 -28
- package/lib-mjs/publicApi/link/removeLink.js.map +1 -1
- package/lib-mjs/publicApi/list/setListStartNumber.d.ts +7 -7
- package/lib-mjs/publicApi/list/setListStartNumber.js +14 -14
- package/lib-mjs/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib-mjs/publicApi/list/setListStyle.d.ts +7 -7
- package/lib-mjs/publicApi/list/setListStyle.js +14 -14
- package/lib-mjs/publicApi/list/setListStyle.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleBullet.d.ts +9 -9
- package/lib-mjs/publicApi/list/toggleBullet.js +18 -18
- package/lib-mjs/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleNumbering.d.ts +9 -9
- package/lib-mjs/publicApi/list/toggleNumbering.js +18 -18
- package/lib-mjs/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib-mjs/publicApi/segment/applySegmentFormat.d.ts +7 -7
- package/lib-mjs/publicApi/segment/applySegmentFormat.js +19 -19
- package/lib-mjs/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib-mjs/publicApi/segment/changeCapitalization.d.ts +10 -10
- package/lib-mjs/publicApi/segment/changeCapitalization.js +45 -45
- package/lib-mjs/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib-mjs/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib-mjs/publicApi/segment/changeFontSize.js +59 -59
- package/lib-mjs/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib-mjs/publicApi/segment/setBackgroundColor.d.ts +7 -7
- package/lib-mjs/publicApi/segment/setBackgroundColor.js +31 -31
- package/lib-mjs/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib-mjs/publicApi/segment/setFontName.d.ts +7 -7
- package/lib-mjs/publicApi/segment/setFontName.js +15 -15
- package/lib-mjs/publicApi/segment/setFontName.js.map +1 -1
- package/lib-mjs/publicApi/segment/setFontSize.d.ts +12 -12
- package/lib-mjs/publicApi/segment/setFontSize.js +28 -28
- package/lib-mjs/publicApi/segment/setFontSize.js.map +1 -1
- package/lib-mjs/publicApi/segment/setTextColor.d.ts +7 -7
- package/lib-mjs/publicApi/segment/setTextColor.js +22 -22
- package/lib-mjs/publicApi/segment/setTextColor.js.map +1 -1
- package/lib-mjs/publicApi/segment/splitTextSegment.d.ts +10 -10
- package/lib-mjs/publicApi/segment/splitTextSegment.js +26 -26
- package/lib-mjs/publicApi/segment/splitTextSegment.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleBold.js +23 -23
- package/lib-mjs/publicApi/segment/toggleBold.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleCode.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleCode.js +24 -24
- package/lib-mjs/publicApi/segment/toggleCode.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleItalic.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleItalic.js +17 -17
- package/lib-mjs/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleStrikethrough.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js +11 -11
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleSubscript.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleSubscript.js +11 -11
- package/lib-mjs/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleSuperscript.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleSuperscript.js +11 -11
- package/lib-mjs/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleUnderline.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleUnderline.js +20 -20
- package/lib-mjs/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib-mjs/publicApi/table/applyTableBorderFormat.d.ts +8 -8
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js +293 -293
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib-mjs/publicApi/table/editTable.d.ts +7 -7
- package/lib-mjs/publicApi/table/editTable.js +91 -91
- package/lib-mjs/publicApi/table/editTable.js.map +1 -1
- package/lib-mjs/publicApi/table/formatTable.d.ts +8 -8
- package/lib-mjs/publicApi/table/formatTable.js +34 -34
- package/lib-mjs/publicApi/table/formatTable.js.map +1 -1
- package/lib-mjs/publicApi/table/insertTable.d.ts +12 -12
- package/lib-mjs/publicApi/table/insertTable.js +72 -72
- package/lib-mjs/publicApi/table/insertTable.js.map +1 -1
- package/lib-mjs/publicApi/table/setTableCellShade.d.ts +7 -7
- package/lib-mjs/publicApi/table/setTableCellShade.js +28 -28
- package/lib-mjs/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib-mjs/publicApi/utils/createEditorContextForEntity.d.ts +8 -8
- package/lib-mjs/publicApi/utils/createEditorContextForEntity.js +25 -25
- package/lib-mjs/publicApi/utils/createEditorContextForEntity.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.d.ts +8 -8
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js +14 -14
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatInsertPointWithContentModel.d.ts +9 -9
- package/lib-mjs/publicApi/utils/formatInsertPointWithContentModel.js +126 -126
- package/lib-mjs/publicApi/utils/formatInsertPointWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.d.ts +8 -8
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js +19 -19
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.d.ts +11 -11
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js +113 -113
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js +42 -42
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatTextSegmentBeforeSelectionMarker.d.ts +8 -8
- package/lib-mjs/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js +30 -30
- package/lib-mjs/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertImage.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/insertImage.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,QAAQ,EACR,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,YAAY,GACf,MAAM,6BAA6B,CAAC;AAGrC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAe,EAAE,cAA6B;IACtE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAI,OAAO,cAAc,IAAI,QAAQ,EAAE;QACnC,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;KAC9C;SAAM;QACH,QAAQ,CAAC,cAAc,EAAE,UAAA,OAAO;YAC5B,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;gBACjC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aACvC;QACL,CAAC,CAAC,CAAC;KACN;AACL,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAe,EAAE,GAAW;IACpD,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,IAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;QAEzC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvB,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;YAC5B,WAAW,EAAE,UAAU;SAC1B,CAAC,CAAC;QACH,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;QACxB,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAE3B,OAAO,IAAI,CAAC;IAChB,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC","sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"insertImage.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/insertImage.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,QAAQ,EACR,UAAU,EACV,0BAA0B,EAC1B,WAAW,EACX,YAAY,GACf,MAAM,6BAA6B,CAAC;AAGrC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,MAAe,EAAE,cAA6B;IACtE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAI,OAAO,cAAc,IAAI,QAAQ,EAAE;QACnC,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;KAC9C;SAAM;QACH,QAAQ,CAAC,cAAc,EAAE,UAAA,OAAO;YAC5B,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;gBACjC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aACvC;QACL,CAAC,CAAC,CAAC;KACN;AACL,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAe,EAAE,GAAW;IACpD,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,IAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;QAEzC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvB,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;YAC5B,WAAW,EAAE,UAAU;SAC1B,CAAC,CAAC;QACH,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;QACxB,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAE3B,OAAO,IAAI,CAAC;IAChB,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC","sourcesContent":["import {\n mergeModel,\n readFile,\n addSegment,\n createContentModelDocument,\n createImage,\n setSelection,\n} from 'roosterjs-content-model-dom';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Insert an image into current selected position\n * @param editor The editor to operate on\n * @param file Image Blob file or source string\n */\nexport function insertImage(editor: IEditor, imageFileOrSrc: File | string) {\n editor.focus();\n\n if (typeof imageFileOrSrc == 'string') {\n insertImageWithSrc(editor, imageFileOrSrc);\n } else {\n readFile(imageFileOrSrc, dataUrl => {\n if (dataUrl && !editor.isDisposed()) {\n insertImageWithSrc(editor, dataUrl);\n }\n });\n }\n}\n\nfunction insertImageWithSrc(editor: IEditor, src: string) {\n editor.formatContentModel(\n (model, context) => {\n const image = createImage(src, { backgroundColor: '' });\n const doc = createContentModelDocument();\n\n addSegment(doc, image);\n mergeModel(model, doc, context, {\n mergeFormat: 'mergeAll',\n });\n image.isSelected = true;\n setSelection(model, image);\n\n return true;\n },\n {\n apiName: 'insertImage',\n }\n );\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
-
* in selection, do nothing.
|
|
5
|
-
* @param editor The editor instance
|
|
6
|
-
* @param altText The image alt text
|
|
7
|
-
*/
|
|
8
|
-
export declare function setImageAltText(editor: IEditor, altText: string): void;
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
+
* in selection, do nothing.
|
|
5
|
+
* @param editor The editor instance
|
|
6
|
+
* @param altText The image alt text
|
|
7
|
+
*/
|
|
8
|
+
export declare function setImageAltText(editor: IEditor, altText: string): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';
|
|
2
|
-
/**
|
|
3
|
-
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
-
* in selection, do nothing.
|
|
5
|
-
* @param editor The editor instance
|
|
6
|
-
* @param altText The image alt text
|
|
7
|
-
*/
|
|
8
|
-
export function setImageAltText(editor, altText) {
|
|
9
|
-
editor.focus();
|
|
10
|
-
formatImageWithContentModel(editor, 'setImageAltText', function (image) {
|
|
11
|
-
image.alt = altText;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';
|
|
2
|
+
/**
|
|
3
|
+
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
+
* in selection, do nothing.
|
|
5
|
+
* @param editor The editor instance
|
|
6
|
+
* @param altText The image alt text
|
|
7
|
+
*/
|
|
8
|
+
export function setImageAltText(editor, altText) {
|
|
9
|
+
editor.focus();
|
|
10
|
+
formatImageWithContentModel(editor, 'setImageAltText', function (image) {
|
|
11
|
+
image.alt = altText;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
14
|
//# sourceMappingURL=setImageAltText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setImageAltText.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageAltText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,MAAe,EAAE,OAAe;IAC5D,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAC,KAAwB;QAC5E,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\
|
|
1
|
+
{"version":3,"file":"setImageAltText.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageAltText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,MAAe,EAAE,OAAe;IAC5D,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAC,KAAwB;QAC5E,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set image alt text for all selected images at selection. If no images is contained\n * in selection, do nothing.\n * @param editor The editor instance\n * @param altText The image alt text\n */\nexport function setImageAltText(editor: IEditor, altText: string) {\n editor.focus();\n\n formatImageWithContentModel(editor, 'setImageAltText', (image: ContentModelImage) => {\n image.alt = altText;\n });\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Border, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set image border style for all selected images at selection.
|
|
4
|
-
* @param editor The editor instance
|
|
5
|
-
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
6
|
-
* its value will not be changed. Passing null instead of an object will remove the border
|
|
7
|
-
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
8
|
-
*/
|
|
9
|
-
export declare function setImageBorder(editor: IEditor, border: Border | null, borderRadius?: string): void;
|
|
1
|
+
import type { Border, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set image border style for all selected images at selection.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
6
|
+
* its value will not be changed. Passing null instead of an object will remove the border
|
|
7
|
+
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
8
|
+
*/
|
|
9
|
+
export declare function setImageBorder(editor: IEditor, border: Border | null, borderRadius?: string): void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { applyImageBorderFormat } from '../../modelApi/image/applyImageBorderFormat';
|
|
2
|
-
import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';
|
|
3
|
-
/**
|
|
4
|
-
* Set image border style for all selected images at selection.
|
|
5
|
-
* @param editor The editor instance
|
|
6
|
-
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
7
|
-
* its value will not be changed. Passing null instead of an object will remove the border
|
|
8
|
-
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
9
|
-
*/
|
|
10
|
-
export function setImageBorder(editor, border, borderRadius) {
|
|
11
|
-
editor.focus();
|
|
12
|
-
formatImageWithContentModel(editor, 'setImageBorder', function (image) {
|
|
13
|
-
applyImageBorderFormat(image, border, borderRadius);
|
|
14
|
-
});
|
|
15
|
-
}
|
|
1
|
+
import { applyImageBorderFormat } from '../../modelApi/image/applyImageBorderFormat';
|
|
2
|
+
import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';
|
|
3
|
+
/**
|
|
4
|
+
* Set image border style for all selected images at selection.
|
|
5
|
+
* @param editor The editor instance
|
|
6
|
+
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
7
|
+
* its value will not be changed. Passing null instead of an object will remove the border
|
|
8
|
+
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
9
|
+
*/
|
|
10
|
+
export function setImageBorder(editor, border, borderRadius) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
formatImageWithContentModel(editor, 'setImageBorder', function (image) {
|
|
13
|
+
applyImageBorderFormat(image, border, borderRadius);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
16
|
//# sourceMappingURL=setImageBorder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setImageBorder.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageBorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,MAAe,EAAE,MAAqB,EAAE,YAAqB;IACxF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,gBAAgB,EAAE,UAAC,KAAwB;QAC3E,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { applyImageBorderFormat } from '../../modelApi/image/applyImageBorderFormat';\
|
|
1
|
+
{"version":3,"file":"setImageBorder.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageBorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,MAAe,EAAE,MAAqB,EAAE,YAAqB;IACxF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,gBAAgB,EAAE,UAAC,KAAwB;QAC3E,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { applyImageBorderFormat } from '../../modelApi/image/applyImageBorderFormat';\nimport { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\nimport type { Border, ContentModelImage, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set image border style for all selected images at selection.\n * @param editor The editor instance\n * @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined\n * its value will not be changed. Passing null instead of an object will remove the border\n * @param borderRadius the border radius value, if undefined, the border radius will keep the actual value\n */\nexport function setImageBorder(editor: IEditor, border: Border | null, borderRadius?: string) {\n editor.focus();\n\n formatImageWithContentModel(editor, 'setImageBorder', (image: ContentModelImage) => {\n applyImageBorderFormat(image, border, borderRadius);\n });\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set image box shadow for all selected images at selection.
|
|
4
|
-
* @param editor The editor instance
|
|
5
|
-
* @param boxShadow The image box boxShadow
|
|
6
|
-
* @param margin The image margin for all sides (eg. "4px"), null to remove margin
|
|
7
|
-
*/
|
|
8
|
-
export declare function setImageBoxShadow(editor: IEditor, boxShadow: string, margin?: string | null): void;
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set image box shadow for all selected images at selection.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param boxShadow The image box boxShadow
|
|
6
|
+
* @param margin The image margin for all sides (eg. "4px"), null to remove margin
|
|
7
|
+
*/
|
|
8
|
+
export declare function setImageBoxShadow(editor: IEditor, boxShadow: string, margin?: string | null): void;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';
|
|
2
|
-
/**
|
|
3
|
-
* Set image box shadow for all selected images at selection.
|
|
4
|
-
* @param editor The editor instance
|
|
5
|
-
* @param boxShadow The image box boxShadow
|
|
6
|
-
* @param margin The image margin for all sides (eg. "4px"), null to remove margin
|
|
7
|
-
*/
|
|
8
|
-
export function setImageBoxShadow(editor, boxShadow, margin) {
|
|
9
|
-
editor.focus();
|
|
10
|
-
formatImageWithContentModel(editor, 'setImageBoxShadow', function (image) {
|
|
11
|
-
image.format.boxShadow = boxShadow;
|
|
12
|
-
if (margin) {
|
|
13
|
-
image.format.marginBottom = margin;
|
|
14
|
-
image.format.marginLeft = margin;
|
|
15
|
-
image.format.marginRight = margin;
|
|
16
|
-
image.format.marginTop = margin;
|
|
17
|
-
}
|
|
18
|
-
else if (margin === null) {
|
|
19
|
-
delete image.format.marginBottom;
|
|
20
|
-
delete image.format.marginLeft;
|
|
21
|
-
delete image.format.marginRight;
|
|
22
|
-
delete image.format.marginTop;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
1
|
+
import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';
|
|
2
|
+
/**
|
|
3
|
+
* Set image box shadow for all selected images at selection.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param boxShadow The image box boxShadow
|
|
6
|
+
* @param margin The image margin for all sides (eg. "4px"), null to remove margin
|
|
7
|
+
*/
|
|
8
|
+
export function setImageBoxShadow(editor, boxShadow, margin) {
|
|
9
|
+
editor.focus();
|
|
10
|
+
formatImageWithContentModel(editor, 'setImageBoxShadow', function (image) {
|
|
11
|
+
image.format.boxShadow = boxShadow;
|
|
12
|
+
if (margin) {
|
|
13
|
+
image.format.marginBottom = margin;
|
|
14
|
+
image.format.marginLeft = margin;
|
|
15
|
+
image.format.marginRight = margin;
|
|
16
|
+
image.format.marginTop = margin;
|
|
17
|
+
}
|
|
18
|
+
else if (margin === null) {
|
|
19
|
+
delete image.format.marginBottom;
|
|
20
|
+
delete image.format.marginLeft;
|
|
21
|
+
delete image.format.marginRight;
|
|
22
|
+
delete image.format.marginTop;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
26
|
//# sourceMappingURL=setImageBoxShadow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setImageBoxShadow.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageBoxShadow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAe,EAAE,SAAiB,EAAE,MAAsB;IACxF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,EAAE,UAAC,KAAwB;QAC9E,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QACnC,IAAI,MAAM,EAAE;YACR,KAAK,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;YACnC,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC;YACjC,KAAK,CAAC,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC;YAClC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC;SACnC;aAAM,IAAI,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;YACjC,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;YAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC;YAChC,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;SACjC;IACL,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\
|
|
1
|
+
{"version":3,"file":"setImageBoxShadow.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageBoxShadow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAe,EAAE,SAAiB,EAAE,MAAsB;IACxF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,EAAE,UAAC,KAAwB;QAC9E,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QACnC,IAAI,MAAM,EAAE;YACR,KAAK,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC;YACnC,KAAK,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC;YACjC,KAAK,CAAC,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC;YAClC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC;SACnC;aAAM,IAAI,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;YACjC,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;YAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC;YAChC,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;SACjC;IACL,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set image box shadow for all selected images at selection.\n * @param editor The editor instance\n * @param boxShadow The image box boxShadow\n * @param margin The image margin for all sides (eg. \"4px\"), null to remove margin\n */\nexport function setImageBoxShadow(editor: IEditor, boxShadow: string, margin?: string | null) {\n editor.focus();\n\n formatImageWithContentModel(editor, 'setImageBoxShadow', (image: ContentModelImage) => {\n image.format.boxShadow = boxShadow;\n if (margin) {\n image.format.marginBottom = margin;\n image.format.marginLeft = margin;\n image.format.marginRight = margin;\n image.format.marginTop = margin;\n } else if (margin === null) {\n delete image.format.marginBottom;\n delete image.format.marginLeft;\n delete image.format.marginRight;\n delete image.format.marginTop;\n }\n });\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Adjust selection to make sure select a hyperlink if any, or a word if original selection is collapsed
|
|
4
|
-
* @return A combination of existing link display text and url if any. If there is no existing link, return selected text and null
|
|
5
|
-
*/
|
|
6
|
-
export declare function adjustLinkSelection(editor: IEditor): [string, string | null];
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Adjust selection to make sure select a hyperlink if any, or a word if original selection is collapsed
|
|
4
|
+
* @return A combination of existing link display text and url if any. If there is no existing link, return selected text and null
|
|
5
|
+
*/
|
|
6
|
+
export declare function adjustLinkSelection(editor: IEditor): [string, string | null];
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';
|
|
2
|
-
import { adjustWordSelection } from '../../modelApi/selection/adjustWordSelection';
|
|
3
|
-
import { getSelectedSegments, setSelection } from 'roosterjs-content-model-dom';
|
|
4
|
-
/**
|
|
5
|
-
* Adjust selection to make sure select a hyperlink if any, or a word if original selection is collapsed
|
|
6
|
-
* @return A combination of existing link display text and url if any. If there is no existing link, return selected text and null
|
|
7
|
-
*/
|
|
8
|
-
export function adjustLinkSelection(editor) {
|
|
9
|
-
var text = '';
|
|
10
|
-
var url = null;
|
|
11
|
-
editor.formatContentModel(function (model) {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
var changed = adjustSegmentSelection(model, function (target) { return !!target.isSelected && !!target.link; }, function (target, ref) { return !!target.link && target.link.format.href == ref.link.format.href; });
|
|
14
|
-
var segments = getSelectedSegments(model, false /*includingFormatHolder*/, true /*mutate*/);
|
|
15
|
-
var firstSegment = segments[0];
|
|
16
|
-
if (segments.length == 1 && firstSegment.segmentType == 'SelectionMarker') {
|
|
17
|
-
segments = adjustWordSelection(model, firstSegment);
|
|
18
|
-
if (segments.length > 1) {
|
|
19
|
-
changed = true;
|
|
20
|
-
setSelection(model, segments[0], segments[segments.length - 1]);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
text = segments.map(function (x) { return (x.segmentType == 'Text' ? x.text : ''); }).join('');
|
|
24
|
-
url = ((_b = (_a = segments[0]) === null || _a === void 0 ? void 0 : _a.link) === null || _b === void 0 ? void 0 : _b.format.href) || null;
|
|
25
|
-
return changed;
|
|
26
|
-
}, {
|
|
27
|
-
apiName: 'adjustLinkSelection',
|
|
28
|
-
});
|
|
29
|
-
return [text, url];
|
|
30
|
-
}
|
|
1
|
+
import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';
|
|
2
|
+
import { adjustWordSelection } from '../../modelApi/selection/adjustWordSelection';
|
|
3
|
+
import { getSelectedSegments, setSelection } from 'roosterjs-content-model-dom';
|
|
4
|
+
/**
|
|
5
|
+
* Adjust selection to make sure select a hyperlink if any, or a word if original selection is collapsed
|
|
6
|
+
* @return A combination of existing link display text and url if any. If there is no existing link, return selected text and null
|
|
7
|
+
*/
|
|
8
|
+
export function adjustLinkSelection(editor) {
|
|
9
|
+
var text = '';
|
|
10
|
+
var url = null;
|
|
11
|
+
editor.formatContentModel(function (model) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
var changed = adjustSegmentSelection(model, function (target) { return !!target.isSelected && !!target.link; }, function (target, ref) { return !!target.link && target.link.format.href == ref.link.format.href; });
|
|
14
|
+
var segments = getSelectedSegments(model, false /*includingFormatHolder*/, true /*mutate*/);
|
|
15
|
+
var firstSegment = segments[0];
|
|
16
|
+
if (segments.length == 1 && firstSegment.segmentType == 'SelectionMarker') {
|
|
17
|
+
segments = adjustWordSelection(model, firstSegment);
|
|
18
|
+
if (segments.length > 1) {
|
|
19
|
+
changed = true;
|
|
20
|
+
setSelection(model, segments[0], segments[segments.length - 1]);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
text = segments.map(function (x) { return (x.segmentType == 'Text' ? x.text : ''); }).join('');
|
|
24
|
+
url = ((_b = (_a = segments[0]) === null || _a === void 0 ? void 0 : _a.link) === null || _b === void 0 ? void 0 : _b.format.href) || null;
|
|
25
|
+
return changed;
|
|
26
|
+
}, {
|
|
27
|
+
apiName: 'adjustLinkSelection',
|
|
28
|
+
});
|
|
29
|
+
return [text, url];
|
|
30
|
+
}
|
|
31
31
|
//# sourceMappingURL=adjustLinkSelection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adjustLinkSelection.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/link/adjustLinkSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhF;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe;IAC/C,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,GAAG,GAAkB,IAAI,CAAC;IAE9B,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;;QACD,IAAI,OAAO,GAAG,sBAAsB,CAChC,KAAK,EACL,UAAA,MAAM,IAAI,OAAA,CAAC,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAApC,CAAoC,EAC9C,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC,IAAK,CAAC,MAAM,CAAC,IAAI,EAAjE,CAAiE,CACrF,CAAC;QACF,IAAI,QAAQ,GAAG,mBAAmB,CAC9B,KAAK,EACL,KAAK,CAAC,yBAAyB,EAC/B,IAAI,CAAC,UAAU,CAClB,CAAC;QACF,IAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAEjC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,YAAY,CAAC,WAAW,IAAI,iBAAiB,EAAE;YACvE,QAAQ,GAAG,mBAAmB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;YAEpD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACrB,OAAO,GAAG,IAAI,CAAC;gBACf,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;aACnE;SACJ;QAED,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,CAAC,WAAW,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAvC,CAAuC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3E,GAAG,GAAG,CAAA,MAAA,MAAA,QAAQ,CAAC,CAAC,CAAC,0CAAE,IAAI,0CAAE,MAAM,CAAC,IAAI,KAAI,IAAI,CAAC;QAE7C,OAAO,OAAO,CAAC;IACnB,CAAC,EACD;QACI,OAAO,EAAE,qBAAqB;KACjC,CACJ,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACvB,CAAC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\
|
|
1
|
+
{"version":3,"file":"adjustLinkSelection.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/link/adjustLinkSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhF;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe;IAC/C,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,GAAG,GAAkB,IAAI,CAAC;IAE9B,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;;QACD,IAAI,OAAO,GAAG,sBAAsB,CAChC,KAAK,EACL,UAAA,MAAM,IAAI,OAAA,CAAC,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAApC,CAAoC,EAC9C,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC,IAAK,CAAC,MAAM,CAAC,IAAI,EAAjE,CAAiE,CACrF,CAAC;QACF,IAAI,QAAQ,GAAG,mBAAmB,CAC9B,KAAK,EACL,KAAK,CAAC,yBAAyB,EAC/B,IAAI,CAAC,UAAU,CAClB,CAAC;QACF,IAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAEjC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,YAAY,CAAC,WAAW,IAAI,iBAAiB,EAAE;YACvE,QAAQ,GAAG,mBAAmB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;YAEpD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBACrB,OAAO,GAAG,IAAI,CAAC;gBACf,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;aACnE;SACJ;QAED,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,CAAC,WAAW,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAvC,CAAuC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3E,GAAG,GAAG,CAAA,MAAA,MAAA,QAAQ,CAAC,CAAC,CAAC,0CAAE,IAAI,0CAAE,MAAM,CAAC,IAAI,KAAI,IAAI,CAAC;QAE7C,OAAO,OAAO,CAAC;IACnB,CAAC,EACD;QACI,OAAO,EAAE,qBAAqB;KACjC,CACJ,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACvB,CAAC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\nimport { adjustWordSelection } from '../../modelApi/selection/adjustWordSelection';\nimport { getSelectedSegments, setSelection } from 'roosterjs-content-model-dom';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Adjust selection to make sure select a hyperlink if any, or a word if original selection is collapsed\n * @return A combination of existing link display text and url if any. If there is no existing link, return selected text and null\n */\nexport function adjustLinkSelection(editor: IEditor): [string, string | null] {\n let text = '';\n let url: string | null = null;\n\n editor.formatContentModel(\n model => {\n let changed = adjustSegmentSelection(\n model,\n target => !!target.isSelected && !!target.link,\n (target, ref) => !!target.link && target.link.format.href == ref.link!.format.href\n );\n let segments = getSelectedSegments(\n model,\n false /*includingFormatHolder*/,\n true /*mutate*/\n );\n const firstSegment = segments[0];\n\n if (segments.length == 1 && firstSegment.segmentType == 'SelectionMarker') {\n segments = adjustWordSelection(model, firstSegment);\n\n if (segments.length > 1) {\n changed = true;\n setSelection(model, segments[0], segments[segments.length - 1]);\n }\n }\n\n text = segments.map(x => (x.segmentType == 'Text' ? x.text : '')).join('');\n url = segments[0]?.link?.format.href || null;\n\n return changed;\n },\n {\n apiName: 'adjustLinkSelection',\n }\n );\n\n return [text, url];\n}\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Insert a hyperlink at cursor.
|
|
4
|
-
* When there is a selection, hyperlink will be applied to the selection,
|
|
5
|
-
* otherwise a hyperlink will be inserted to the cursor position.
|
|
6
|
-
* @param editor Editor object
|
|
7
|
-
* @param link Link address, can be http(s), mailto, notes, file, unc, ftp, news, telnet, gopher, wais.
|
|
8
|
-
* When protocol is not specified, a best matched protocol will be predicted.
|
|
9
|
-
* @param anchorTitle Optional alt text of the link, will be shown when hover on the link
|
|
10
|
-
* @param displayText Optional display text for the link.
|
|
11
|
-
* @param target Optional display target for the link ("_blank"|"_self"|"_parent"|"_top"|"{framename}")
|
|
12
|
-
* If specified, the display text of link will be replaced with this text.
|
|
13
|
-
* If not specified and there wasn't a link, the link url will be used as display text.
|
|
14
|
-
*/
|
|
15
|
-
export declare function insertLink(editor: IEditor, link: string, anchorTitle?: string, displayText?: string, target?: string): void;
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a hyperlink at cursor.
|
|
4
|
+
* When there is a selection, hyperlink will be applied to the selection,
|
|
5
|
+
* otherwise a hyperlink will be inserted to the cursor position.
|
|
6
|
+
* @param editor Editor object
|
|
7
|
+
* @param link Link address, can be http(s), mailto, notes, file, unc, ftp, news, telnet, gopher, wais.
|
|
8
|
+
* When protocol is not specified, a best matched protocol will be predicted.
|
|
9
|
+
* @param anchorTitle Optional alt text of the link, will be shown when hover on the link
|
|
10
|
+
* @param displayText Optional display text for the link.
|
|
11
|
+
* @param target Optional display target for the link ("_blank"|"_self"|"_parent"|"_top"|"{framename}")
|
|
12
|
+
* If specified, the display text of link will be replaced with this text.
|
|
13
|
+
* If not specified and there wasn't a link, the link url will be used as display text.
|
|
14
|
+
*/
|
|
15
|
+
export declare function insertLink(editor: IEditor, link: string, anchorTitle?: string, displayText?: string, target?: string): void;
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { adjustTrailingSpaceSelection } from '../../modelApi/selection/adjustTrailingSpaceSelection';
|
|
3
|
-
import { matchLink } from '../../modelApi/link/matchLink';
|
|
4
|
-
import { addLink, addSegment, ChangeSource, createContentModelDocument, createText, getSelectedSegments, mergeModel, } from 'roosterjs-content-model-dom';
|
|
5
|
-
// Regex matching Uri scheme
|
|
6
|
-
var URI_REGEX = /^[a-zA-Z]+:/i;
|
|
7
|
-
// Regex matching begin of email address
|
|
8
|
-
var MAILTO_REGEX = /^[\w.%+-]+@/i;
|
|
9
|
-
// Regex matching begin of ftp, i.e. ftp.microsoft.com
|
|
10
|
-
var FTP_REGEX = /^ftp\./i;
|
|
11
|
-
/**
|
|
12
|
-
* Insert a hyperlink at cursor.
|
|
13
|
-
* When there is a selection, hyperlink will be applied to the selection,
|
|
14
|
-
* otherwise a hyperlink will be inserted to the cursor position.
|
|
15
|
-
* @param editor Editor object
|
|
16
|
-
* @param link Link address, can be http(s), mailto, notes, file, unc, ftp, news, telnet, gopher, wais.
|
|
17
|
-
* When protocol is not specified, a best matched protocol will be predicted.
|
|
18
|
-
* @param anchorTitle Optional alt text of the link, will be shown when hover on the link
|
|
19
|
-
* @param displayText Optional display text for the link.
|
|
20
|
-
* @param target Optional display target for the link ("_blank"|"_self"|"_parent"|"_top"|"{framename}")
|
|
21
|
-
* If specified, the display text of link will be replaced with this text.
|
|
22
|
-
* If not specified and there wasn't a link, the link url will be used as display text.
|
|
23
|
-
*/
|
|
24
|
-
export function insertLink(editor, link, anchorTitle, displayText, target) {
|
|
25
|
-
editor.focus();
|
|
26
|
-
var url = (checkXss(link) || '').trim();
|
|
27
|
-
if (url) {
|
|
28
|
-
var linkData_1 = matchLink(url);
|
|
29
|
-
var linkUrl_1 = linkData_1 ? linkData_1.normalizedUrl : applyLinkPrefix(url);
|
|
30
|
-
var links_1 = [];
|
|
31
|
-
var anchorNode_1;
|
|
32
|
-
editor.formatContentModel(function (model, context) {
|
|
33
|
-
var _a;
|
|
34
|
-
var segments = getSelectedSegments(model, false /*includingFormatHolder*/, true /*mutate*/);
|
|
35
|
-
var originalText = segments
|
|
36
|
-
.map(function (x) { return (x.segmentType == 'Text' ? x.text : ''); })
|
|
37
|
-
.join('');
|
|
38
|
-
var text = displayText || originalText || '';
|
|
39
|
-
if ((segments.some(function (x) { return x.segmentType != 'SelectionMarker'; }) &&
|
|
40
|
-
originalText == text) ||
|
|
41
|
-
(segments.length == 1 && segments[0].segmentType == 'Image')) {
|
|
42
|
-
segments.forEach(function (x) {
|
|
43
|
-
var link = createLink(linkUrl_1, anchorTitle, target, x.segmentType == 'Text');
|
|
44
|
-
addLink(x, link);
|
|
45
|
-
if (x.link) {
|
|
46
|
-
links_1.push(x.link);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
else if (segments.every(function (x) { return x.segmentType == 'SelectionMarker'; }) ||
|
|
51
|
-
(!!text && text != originalText)) {
|
|
52
|
-
var segment = createText(text || (linkData_1 ? linkData_1.originalUrl : url), __assign(__assign({}, (_a = segments[0]) === null || _a === void 0 ? void 0 : _a.format), editor.getPendingFormat()));
|
|
53
|
-
var doc = createContentModelDocument();
|
|
54
|
-
var link_1 = createLink(linkUrl_1, anchorTitle, target);
|
|
55
|
-
addLink(segment, link_1);
|
|
56
|
-
addSegment(doc, segment);
|
|
57
|
-
if (segment.link) {
|
|
58
|
-
links_1.push(segment.link);
|
|
59
|
-
}
|
|
60
|
-
mergeModel(model, doc, context, {
|
|
61
|
-
mergeFormat: 'mergeAll',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
adjustTrailingSpaceSelection(model);
|
|
65
|
-
return segments.length > 0;
|
|
66
|
-
}, {
|
|
67
|
-
changeSource: ChangeSource.CreateLink,
|
|
68
|
-
onNodeCreated: function (modelElement, node) {
|
|
69
|
-
if (!anchorNode_1 && links_1.indexOf(modelElement) >= 0) {
|
|
70
|
-
anchorNode_1 = node;
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
getChangeData: function () { return anchorNode_1; },
|
|
74
|
-
apiName: 'insertLink',
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
var createLink = function (url, anchorTitle, target, underline) {
|
|
79
|
-
if (underline === void 0) { underline = true; }
|
|
80
|
-
return {
|
|
81
|
-
dataset: {},
|
|
82
|
-
format: {
|
|
83
|
-
href: url,
|
|
84
|
-
anchorTitle: anchorTitle,
|
|
85
|
-
target: target,
|
|
86
|
-
underline: underline,
|
|
87
|
-
},
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
function applyLinkPrefix(url) {
|
|
91
|
-
if (!url) {
|
|
92
|
-
return url;
|
|
93
|
-
}
|
|
94
|
-
// Add link prefix per rule:
|
|
95
|
-
// (a) if the url always starts with a URI scheme, leave it as it is
|
|
96
|
-
// (b) if the url is an email address, xxx@... add mailto: prefix
|
|
97
|
-
// (c) if the url starts with ftp., add ftp:// prefix
|
|
98
|
-
// (d) rest, add http:// prefix
|
|
99
|
-
var prefix = '';
|
|
100
|
-
if (url.search(URI_REGEX) < 0) {
|
|
101
|
-
if (url.search(MAILTO_REGEX) == 0) {
|
|
102
|
-
prefix = 'mailto:';
|
|
103
|
-
}
|
|
104
|
-
else if (url.search(FTP_REGEX) == 0) {
|
|
105
|
-
prefix = 'ftp://';
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
// fallback to http://
|
|
109
|
-
prefix = 'http://';
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return prefix + url;
|
|
113
|
-
}
|
|
114
|
-
function checkXss(link) {
|
|
115
|
-
return link.match(/s\n*c\n*r\n*i\n*p\n*t\n*:/i) ? '' : link;
|
|
116
|
-
}
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { adjustTrailingSpaceSelection } from '../../modelApi/selection/adjustTrailingSpaceSelection';
|
|
3
|
+
import { matchLink } from '../../modelApi/link/matchLink';
|
|
4
|
+
import { addLink, addSegment, ChangeSource, createContentModelDocument, createText, getSelectedSegments, mergeModel, } from 'roosterjs-content-model-dom';
|
|
5
|
+
// Regex matching Uri scheme
|
|
6
|
+
var URI_REGEX = /^[a-zA-Z]+:/i;
|
|
7
|
+
// Regex matching begin of email address
|
|
8
|
+
var MAILTO_REGEX = /^[\w.%+-]+@/i;
|
|
9
|
+
// Regex matching begin of ftp, i.e. ftp.microsoft.com
|
|
10
|
+
var FTP_REGEX = /^ftp\./i;
|
|
11
|
+
/**
|
|
12
|
+
* Insert a hyperlink at cursor.
|
|
13
|
+
* When there is a selection, hyperlink will be applied to the selection,
|
|
14
|
+
* otherwise a hyperlink will be inserted to the cursor position.
|
|
15
|
+
* @param editor Editor object
|
|
16
|
+
* @param link Link address, can be http(s), mailto, notes, file, unc, ftp, news, telnet, gopher, wais.
|
|
17
|
+
* When protocol is not specified, a best matched protocol will be predicted.
|
|
18
|
+
* @param anchorTitle Optional alt text of the link, will be shown when hover on the link
|
|
19
|
+
* @param displayText Optional display text for the link.
|
|
20
|
+
* @param target Optional display target for the link ("_blank"|"_self"|"_parent"|"_top"|"{framename}")
|
|
21
|
+
* If specified, the display text of link will be replaced with this text.
|
|
22
|
+
* If not specified and there wasn't a link, the link url will be used as display text.
|
|
23
|
+
*/
|
|
24
|
+
export function insertLink(editor, link, anchorTitle, displayText, target) {
|
|
25
|
+
editor.focus();
|
|
26
|
+
var url = (checkXss(link) || '').trim();
|
|
27
|
+
if (url) {
|
|
28
|
+
var linkData_1 = matchLink(url);
|
|
29
|
+
var linkUrl_1 = linkData_1 ? linkData_1.normalizedUrl : applyLinkPrefix(url);
|
|
30
|
+
var links_1 = [];
|
|
31
|
+
var anchorNode_1;
|
|
32
|
+
editor.formatContentModel(function (model, context) {
|
|
33
|
+
var _a;
|
|
34
|
+
var segments = getSelectedSegments(model, false /*includingFormatHolder*/, true /*mutate*/);
|
|
35
|
+
var originalText = segments
|
|
36
|
+
.map(function (x) { return (x.segmentType == 'Text' ? x.text : ''); })
|
|
37
|
+
.join('');
|
|
38
|
+
var text = displayText || originalText || '';
|
|
39
|
+
if ((segments.some(function (x) { return x.segmentType != 'SelectionMarker'; }) &&
|
|
40
|
+
originalText == text) ||
|
|
41
|
+
(segments.length == 1 && segments[0].segmentType == 'Image')) {
|
|
42
|
+
segments.forEach(function (x) {
|
|
43
|
+
var link = createLink(linkUrl_1, anchorTitle, target, x.segmentType == 'Text');
|
|
44
|
+
addLink(x, link);
|
|
45
|
+
if (x.link) {
|
|
46
|
+
links_1.push(x.link);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
else if (segments.every(function (x) { return x.segmentType == 'SelectionMarker'; }) ||
|
|
51
|
+
(!!text && text != originalText)) {
|
|
52
|
+
var segment = createText(text || (linkData_1 ? linkData_1.originalUrl : url), __assign(__assign({}, (_a = segments[0]) === null || _a === void 0 ? void 0 : _a.format), editor.getPendingFormat()));
|
|
53
|
+
var doc = createContentModelDocument();
|
|
54
|
+
var link_1 = createLink(linkUrl_1, anchorTitle, target);
|
|
55
|
+
addLink(segment, link_1);
|
|
56
|
+
addSegment(doc, segment);
|
|
57
|
+
if (segment.link) {
|
|
58
|
+
links_1.push(segment.link);
|
|
59
|
+
}
|
|
60
|
+
mergeModel(model, doc, context, {
|
|
61
|
+
mergeFormat: 'mergeAll',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
adjustTrailingSpaceSelection(model);
|
|
65
|
+
return segments.length > 0;
|
|
66
|
+
}, {
|
|
67
|
+
changeSource: ChangeSource.CreateLink,
|
|
68
|
+
onNodeCreated: function (modelElement, node) {
|
|
69
|
+
if (!anchorNode_1 && links_1.indexOf(modelElement) >= 0) {
|
|
70
|
+
anchorNode_1 = node;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
getChangeData: function () { return anchorNode_1; },
|
|
74
|
+
apiName: 'insertLink',
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
var createLink = function (url, anchorTitle, target, underline) {
|
|
79
|
+
if (underline === void 0) { underline = true; }
|
|
80
|
+
return {
|
|
81
|
+
dataset: {},
|
|
82
|
+
format: {
|
|
83
|
+
href: url,
|
|
84
|
+
anchorTitle: anchorTitle,
|
|
85
|
+
target: target,
|
|
86
|
+
underline: underline,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
function applyLinkPrefix(url) {
|
|
91
|
+
if (!url) {
|
|
92
|
+
return url;
|
|
93
|
+
}
|
|
94
|
+
// Add link prefix per rule:
|
|
95
|
+
// (a) if the url always starts with a URI scheme, leave it as it is
|
|
96
|
+
// (b) if the url is an email address, xxx@... add mailto: prefix
|
|
97
|
+
// (c) if the url starts with ftp., add ftp:// prefix
|
|
98
|
+
// (d) rest, add http:// prefix
|
|
99
|
+
var prefix = '';
|
|
100
|
+
if (url.search(URI_REGEX) < 0) {
|
|
101
|
+
if (url.search(MAILTO_REGEX) == 0) {
|
|
102
|
+
prefix = 'mailto:';
|
|
103
|
+
}
|
|
104
|
+
else if (url.search(FTP_REGEX) == 0) {
|
|
105
|
+
prefix = 'ftp://';
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
// fallback to http://
|
|
109
|
+
prefix = 'http://';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return prefix + url;
|
|
113
|
+
}
|
|
114
|
+
function checkXss(link) {
|
|
115
|
+
return link.match(/s\n*c\n*r\n*i\n*p\n*t\n*:/i) ? '' : link;
|
|
116
|
+
}
|
|
117
117
|
//# sourceMappingURL=insertLink.js.map
|