roosterjs-content-model-api 9.44.0 → 9.45.0
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 -109
- 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 +117 -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 +57 -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/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 +27 -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 +31 -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 -11
- package/lib/publicApi/table/insertTable.js +76 -52
- 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 -108
- 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 +116 -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 +58 -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/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 +27 -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 +30 -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 -11
- package/lib-amd/publicApi/table/insertTable.js +74 -50
- 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 -105
- 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 +113 -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 +52 -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/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 +23 -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 +27 -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 -11
- package/lib-mjs/publicApi/table/insertTable.js +72 -48
- 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,6 +1,6 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Clear format of selection
|
|
4
|
-
* @param editor The editor to clear format from
|
|
5
|
-
*/
|
|
6
|
-
export declare function clearFormat(editor: IEditor): void;
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Clear format of selection
|
|
4
|
+
* @param editor The editor to clear format from
|
|
5
|
+
*/
|
|
6
|
+
export declare function clearFormat(editor: IEditor): void;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clearFormat = void 0;
|
|
4
|
-
var clearModelFormat_1 = require("../../modelApi/common/clearModelFormat");
|
|
5
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
-
var MAX_TRY = 3;
|
|
7
|
-
/**
|
|
8
|
-
* Clear format of selection
|
|
9
|
-
* @param editor The editor to clear format from
|
|
10
|
-
*/
|
|
11
|
-
function clearFormat(editor) {
|
|
12
|
-
editor.focus();
|
|
13
|
-
editor.formatContentModel(function (model) {
|
|
14
|
-
var changed = false;
|
|
15
|
-
var needtoRun = true;
|
|
16
|
-
var triedTimes = 0;
|
|
17
|
-
while (needtoRun && triedTimes++ < MAX_TRY) {
|
|
18
|
-
var blocksToClear = [];
|
|
19
|
-
var segmentsToClear = [];
|
|
20
|
-
var tablesToClear = [];
|
|
21
|
-
needtoRun = (0, clearModelFormat_1.clearModelFormat)(model, blocksToClear, segmentsToClear, tablesToClear);
|
|
22
|
-
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
23
|
-
changed =
|
|
24
|
-
changed ||
|
|
25
|
-
blocksToClear.length > 0 ||
|
|
26
|
-
segmentsToClear.length > 0 ||
|
|
27
|
-
tablesToClear.length > 0;
|
|
28
|
-
}
|
|
29
|
-
return changed;
|
|
30
|
-
}, {
|
|
31
|
-
apiName: 'clearFormat',
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
exports.clearFormat = clearFormat;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clearFormat = void 0;
|
|
4
|
+
var clearModelFormat_1 = require("../../modelApi/common/clearModelFormat");
|
|
5
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
+
var MAX_TRY = 3;
|
|
7
|
+
/**
|
|
8
|
+
* Clear format of selection
|
|
9
|
+
* @param editor The editor to clear format from
|
|
10
|
+
*/
|
|
11
|
+
function clearFormat(editor) {
|
|
12
|
+
editor.focus();
|
|
13
|
+
editor.formatContentModel(function (model) {
|
|
14
|
+
var changed = false;
|
|
15
|
+
var needtoRun = true;
|
|
16
|
+
var triedTimes = 0;
|
|
17
|
+
while (needtoRun && triedTimes++ < MAX_TRY) {
|
|
18
|
+
var blocksToClear = [];
|
|
19
|
+
var segmentsToClear = [];
|
|
20
|
+
var tablesToClear = [];
|
|
21
|
+
needtoRun = (0, clearModelFormat_1.clearModelFormat)(model, blocksToClear, segmentsToClear, tablesToClear);
|
|
22
|
+
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
23
|
+
changed =
|
|
24
|
+
changed ||
|
|
25
|
+
blocksToClear.length > 0 ||
|
|
26
|
+
segmentsToClear.length > 0 ||
|
|
27
|
+
tablesToClear.length > 0;
|
|
28
|
+
}
|
|
29
|
+
return changed;
|
|
30
|
+
}, {
|
|
31
|
+
apiName: 'clearFormat',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
exports.clearFormat = clearFormat;
|
|
35
35
|
//# sourceMappingURL=clearFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clearFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/format/clearFormat.ts"],"names":[],"mappings":";;;AAAA,2EAA0E;AAC1E,2EAAoE;AASpE,IAAM,OAAO,GAAG,CAAC,CAAC;AAElB;;;GAGG;AACH,SAAgB,WAAW,CAAC,MAAe;IACvC,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,SAAS,GAAG,IAAI,CAAC;QACrB,IAAI,UAAU,GAAG,CAAC,CAAC;QAEnB,OAAO,SAAS,IAAI,UAAU,EAAE,GAAG,OAAO,EAAE;YACxC,IAAM,aAAa,GAAoD,EAAE,CAAC;YAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;YAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;YAEzD,SAAS,GAAG,IAAA,mCAAgB,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEnF,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO;gBACH,OAAO;oBACP,aAAa,CAAC,MAAM,GAAG,CAAC;oBACxB,eAAe,CAAC,MAAM,GAAG,CAAC;oBAC1B,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;SAChC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC;AA/BD,kCA+BC","sourcesContent":["import { clearModelFormat } from '../../modelApi/common/clearModelFormat';\nimport { normalizeContentModel } from 'roosterjs-content-model-dom';\nimport type {\n IEditor,\n ContentModelBlock,\n ContentModelBlockGroup,\n ContentModelSegment,\n ContentModelTable,\n} from 'roosterjs-content-model-types';\n\nconst MAX_TRY = 3;\n\n/**\n * Clear format of selection\n * @param editor The editor to clear format from\n */\nexport function clearFormat(editor: IEditor) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n let changed = false;\n let needtoRun = true;\n let triedTimes = 0;\n\n while (needtoRun && triedTimes++ < MAX_TRY) {\n const blocksToClear: [ContentModelBlockGroup[], ContentModelBlock][] = [];\n const segmentsToClear: ContentModelSegment[] = [];\n const tablesToClear: [ContentModelTable, boolean][] = [];\n\n needtoRun = clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);\n\n normalizeContentModel(model);\n\n changed =\n changed ||\n blocksToClear.length > 0 ||\n segmentsToClear.length > 0 ||\n tablesToClear.length > 0;\n }\n\n return changed;\n },\n {\n apiName: 'clearFormat',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"clearFormat.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/format/clearFormat.ts"],"names":[],"mappings":";;;AAAA,2EAA0E;AAC1E,2EAAoE;AASpE,IAAM,OAAO,GAAG,CAAC,CAAC;AAElB;;;GAGG;AACH,SAAgB,WAAW,CAAC,MAAe;IACvC,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,SAAS,GAAG,IAAI,CAAC;QACrB,IAAI,UAAU,GAAG,CAAC,CAAC;QAEnB,OAAO,SAAS,IAAI,UAAU,EAAE,GAAG,OAAO,EAAE;YACxC,IAAM,aAAa,GAAoD,EAAE,CAAC;YAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;YAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;YAEzD,SAAS,GAAG,IAAA,mCAAgB,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEnF,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO;gBACH,OAAO;oBACP,aAAa,CAAC,MAAM,GAAG,CAAC;oBACxB,eAAe,CAAC,MAAM,GAAG,CAAC;oBAC1B,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;SAChC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC;AA/BD,kCA+BC","sourcesContent":["import { clearModelFormat } from '../../modelApi/common/clearModelFormat';\r\nimport { normalizeContentModel } from 'roosterjs-content-model-dom';\r\nimport type {\r\n IEditor,\r\n ContentModelBlock,\r\n ContentModelBlockGroup,\r\n ContentModelSegment,\r\n ContentModelTable,\r\n} from 'roosterjs-content-model-types';\r\n\r\nconst MAX_TRY = 3;\r\n\r\n/**\r\n * Clear format of selection\r\n * @param editor The editor to clear format from\r\n */\r\nexport function clearFormat(editor: IEditor) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n let changed = false;\r\n let needtoRun = true;\r\n let triedTimes = 0;\r\n\r\n while (needtoRun && triedTimes++ < MAX_TRY) {\r\n const blocksToClear: [ContentModelBlockGroup[], ContentModelBlock][] = [];\r\n const segmentsToClear: ContentModelSegment[] = [];\r\n const tablesToClear: [ContentModelTable, boolean][] = [];\r\n\r\n needtoRun = clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);\r\n\r\n normalizeContentModel(model);\r\n\r\n changed =\r\n changed ||\r\n blocksToClear.length > 0 ||\r\n segmentsToClear.length > 0 ||\r\n tablesToClear.length > 0;\r\n }\r\n\r\n return changed;\r\n },\r\n {\r\n apiName: 'clearFormat',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IEditor, ContentModelFormatState, ConflictFormatSolution } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Get current format state
|
|
4
|
-
* @param editor The editor to get format from
|
|
5
|
-
* @param conflictSolution The strategy for handling format conflicts
|
|
6
|
-
*/
|
|
7
|
-
export declare function getFormatState(editor: IEditor, conflictSolution?: ConflictFormatSolution): ContentModelFormatState;
|
|
1
|
+
import type { IEditor, ContentModelFormatState, ConflictFormatSolution } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Get current format state
|
|
4
|
+
* @param editor The editor to get format from
|
|
5
|
+
* @param conflictSolution The strategy for handling format conflicts
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFormatState(editor: IEditor, conflictSolution?: ConflictFormatSolution): ContentModelFormatState;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFormatState = void 0;
|
|
4
|
-
var reducedModelChildProcessor_1 = require("../../modelApi/common/reducedModelChildProcessor");
|
|
5
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
-
/**
|
|
7
|
-
* Get current format state
|
|
8
|
-
* @param editor The editor to get format from
|
|
9
|
-
* @param conflictSolution The strategy for handling format conflicts
|
|
10
|
-
*/
|
|
11
|
-
function getFormatState(editor, conflictSolution) {
|
|
12
|
-
if (conflictSolution === void 0) { conflictSolution = 'remove'; }
|
|
13
|
-
var pendingFormat = editor.getPendingFormat();
|
|
14
|
-
var manager = editor.getSnapshotsManager();
|
|
15
|
-
var result = {
|
|
16
|
-
canUndo: manager.hasNewContent || manager.canMove(-1),
|
|
17
|
-
canRedo: manager.canMove(1),
|
|
18
|
-
isDarkMode: editor.isDarkMode(),
|
|
19
|
-
};
|
|
20
|
-
editor.formatContentModel(function (model) {
|
|
21
|
-
(0, roosterjs_content_model_dom_1.retrieveModelFormatState)(model, pendingFormat, result, conflictSolution, editor.getDOMHelper(), editor.isDarkMode(), editor.getColorManager());
|
|
22
|
-
return false;
|
|
23
|
-
}, undefined /*options*/, {
|
|
24
|
-
processorOverride: {
|
|
25
|
-
child: reducedModelChildProcessor_1.reducedModelChildProcessor,
|
|
26
|
-
},
|
|
27
|
-
tryGetFromCache: true,
|
|
28
|
-
});
|
|
29
|
-
return result;
|
|
30
|
-
}
|
|
31
|
-
exports.getFormatState = getFormatState;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFormatState = void 0;
|
|
4
|
+
var reducedModelChildProcessor_1 = require("../../modelApi/common/reducedModelChildProcessor");
|
|
5
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
+
/**
|
|
7
|
+
* Get current format state
|
|
8
|
+
* @param editor The editor to get format from
|
|
9
|
+
* @param conflictSolution The strategy for handling format conflicts
|
|
10
|
+
*/
|
|
11
|
+
function getFormatState(editor, conflictSolution) {
|
|
12
|
+
if (conflictSolution === void 0) { conflictSolution = 'remove'; }
|
|
13
|
+
var pendingFormat = editor.getPendingFormat();
|
|
14
|
+
var manager = editor.getSnapshotsManager();
|
|
15
|
+
var result = {
|
|
16
|
+
canUndo: manager.hasNewContent || manager.canMove(-1),
|
|
17
|
+
canRedo: manager.canMove(1),
|
|
18
|
+
isDarkMode: editor.isDarkMode(),
|
|
19
|
+
};
|
|
20
|
+
editor.formatContentModel(function (model) {
|
|
21
|
+
(0, roosterjs_content_model_dom_1.retrieveModelFormatState)(model, pendingFormat, result, conflictSolution, editor.getDOMHelper(), editor.isDarkMode(), editor.getColorManager());
|
|
22
|
+
return false;
|
|
23
|
+
}, undefined /*options*/, {
|
|
24
|
+
processorOverride: {
|
|
25
|
+
child: reducedModelChildProcessor_1.reducedModelChildProcessor,
|
|
26
|
+
},
|
|
27
|
+
tryGetFromCache: true,
|
|
28
|
+
});
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
exports.getFormatState = getFormatState;
|
|
32
32
|
//# sourceMappingURL=getFormatState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormatState.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/format/getFormatState.ts"],"names":[],"mappings":";;;AAAA,+FAA8F;AAC9F,2EAAuE;AAOvE;;;;GAIG;AACH,SAAgB,cAAc,CAC1B,MAAe,EACf,gBAAmD;IAAnD,iCAAA,EAAA,2BAAmD;IAEnD,IAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAChD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;IAC7C,IAAM,MAAM,GAA4B;QACpC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;KAClC,CAAC;IAEF,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,IAAA,sDAAwB,EACpB,KAAK,EACL,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,MAAM,CAAC,YAAY,EAAE,EACrB,MAAM,CAAC,UAAU,EAAE,EACnB,MAAM,CAAC,eAAe,EAAE,CAC3B,CAAC;QAEF,OAAO,KAAK,CAAC;IACjB,CAAC,EACD,SAAS,CAAC,WAAW,EACrB;QACI,iBAAiB,EAAE;YACf,KAAK,EAAE,uDAA0B;SACpC;QACD,eAAe,EAAE,IAAI;KACxB,CACJ,CAAC;IAEF,OAAO,MAAM,CAAC;AAClB,CAAC;AApCD,wCAoCC","sourcesContent":["import { reducedModelChildProcessor } from '../../modelApi/common/reducedModelChildProcessor';\nimport { retrieveModelFormatState } from 'roosterjs-content-model-dom';\nimport type {\n IEditor,\n ContentModelFormatState,\n ConflictFormatSolution,\n} from 'roosterjs-content-model-types';\n\n/**\n * Get current format state\n * @param editor The editor to get format from\n * @param conflictSolution The strategy for handling format conflicts\n */\nexport function getFormatState(\n editor: IEditor,\n conflictSolution: ConflictFormatSolution = 'remove'\n): ContentModelFormatState {\n const pendingFormat = editor.getPendingFormat();\n const manager = editor.getSnapshotsManager();\n const result: ContentModelFormatState = {\n canUndo: manager.hasNewContent || manager.canMove(-1),\n canRedo: manager.canMove(1),\n isDarkMode: editor.isDarkMode(),\n };\n\n editor.formatContentModel(\n model => {\n retrieveModelFormatState(\n model,\n pendingFormat,\n result,\n conflictSolution,\n editor.getDOMHelper(),\n editor.isDarkMode(),\n editor.getColorManager()\n );\n\n return false;\n },\n undefined /*options*/,\n {\n processorOverride: {\n child: reducedModelChildProcessor,\n },\n tryGetFromCache: true,\n }\n );\n\n return result;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getFormatState.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/format/getFormatState.ts"],"names":[],"mappings":";;;AAAA,+FAA8F;AAC9F,2EAAuE;AAOvE;;;;GAIG;AACH,SAAgB,cAAc,CAC1B,MAAe,EACf,gBAAmD;IAAnD,iCAAA,EAAA,2BAAmD;IAEnD,IAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAChD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;IAC7C,IAAM,MAAM,GAA4B;QACpC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;KAClC,CAAC;IAEF,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,IAAA,sDAAwB,EACpB,KAAK,EACL,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,MAAM,CAAC,YAAY,EAAE,EACrB,MAAM,CAAC,UAAU,EAAE,EACnB,MAAM,CAAC,eAAe,EAAE,CAC3B,CAAC;QAEF,OAAO,KAAK,CAAC;IACjB,CAAC,EACD,SAAS,CAAC,WAAW,EACrB;QACI,iBAAiB,EAAE;YACf,KAAK,EAAE,uDAA0B;SACpC;QACD,eAAe,EAAE,IAAI;KACxB,CACJ,CAAC;IAEF,OAAO,MAAM,CAAC;AAClB,CAAC;AApCD,wCAoCC","sourcesContent":["import { reducedModelChildProcessor } from '../../modelApi/common/reducedModelChildProcessor';\r\nimport { retrieveModelFormatState } from 'roosterjs-content-model-dom';\r\nimport type {\r\n IEditor,\r\n ContentModelFormatState,\r\n ConflictFormatSolution,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Get current format state\r\n * @param editor The editor to get format from\r\n * @param conflictSolution The strategy for handling format conflicts\r\n */\r\nexport function getFormatState(\r\n editor: IEditor,\r\n conflictSolution: ConflictFormatSolution = 'remove'\r\n): ContentModelFormatState {\r\n const pendingFormat = editor.getPendingFormat();\r\n const manager = editor.getSnapshotsManager();\r\n const result: ContentModelFormatState = {\r\n canUndo: manager.hasNewContent || manager.canMove(-1),\r\n canRedo: manager.canMove(1),\r\n isDarkMode: editor.isDarkMode(),\r\n };\r\n\r\n editor.formatContentModel(\r\n model => {\r\n retrieveModelFormatState(\r\n model,\r\n pendingFormat,\r\n result,\r\n conflictSolution,\r\n editor.getDOMHelper(),\r\n editor.isDarkMode(),\r\n editor.getColorManager()\r\n );\r\n\r\n return false;\r\n },\r\n undefined /*options*/,\r\n {\r\n processorOverride: {\r\n child: reducedModelChildProcessor,\r\n },\r\n tryGetFromCache: true,\r\n }\r\n );\r\n\r\n return result;\r\n}\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Adjust selection to make sure select an image if any
|
|
4
|
-
* @return Content Model Image object if an image is select, or null
|
|
5
|
-
*/
|
|
6
|
-
export declare function adjustImageSelection(editor: IEditor): ContentModelImage | null;
|
|
1
|
+
import type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Adjust selection to make sure select an image if any
|
|
4
|
+
* @return Content Model Image object if an image is select, or null
|
|
5
|
+
*/
|
|
6
|
+
export declare function adjustImageSelection(editor: IEditor): ContentModelImage | null;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adjustImageSelection = void 0;
|
|
4
|
-
var adjustSegmentSelection_1 = require("../../modelApi/selection/adjustSegmentSelection");
|
|
5
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
-
/**
|
|
7
|
-
* Adjust selection to make sure select an image if any
|
|
8
|
-
* @return Content Model Image object if an image is select, or null
|
|
9
|
-
*/
|
|
10
|
-
function adjustImageSelection(editor) {
|
|
11
|
-
var image = null;
|
|
12
|
-
editor.formatContentModel(function (model) {
|
|
13
|
-
return (0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target, paragraph) {
|
|
14
|
-
if (target.isSelected && target.segmentType == 'Image') {
|
|
15
|
-
(0, roosterjs_content_model_dom_1.mutateSegment)(paragraph, target, function (segment) {
|
|
16
|
-
image = segment;
|
|
17
|
-
});
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}, function (target, ref) { return target == ref; });
|
|
24
|
-
}, {
|
|
25
|
-
apiName: 'adjustImageSelection',
|
|
26
|
-
});
|
|
27
|
-
return image;
|
|
28
|
-
}
|
|
29
|
-
exports.adjustImageSelection = adjustImageSelection;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adjustImageSelection = void 0;
|
|
4
|
+
var adjustSegmentSelection_1 = require("../../modelApi/selection/adjustSegmentSelection");
|
|
5
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
+
/**
|
|
7
|
+
* Adjust selection to make sure select an image if any
|
|
8
|
+
* @return Content Model Image object if an image is select, or null
|
|
9
|
+
*/
|
|
10
|
+
function adjustImageSelection(editor) {
|
|
11
|
+
var image = null;
|
|
12
|
+
editor.formatContentModel(function (model) {
|
|
13
|
+
return (0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target, paragraph) {
|
|
14
|
+
if (target.isSelected && target.segmentType == 'Image') {
|
|
15
|
+
(0, roosterjs_content_model_dom_1.mutateSegment)(paragraph, target, function (segment) {
|
|
16
|
+
image = segment;
|
|
17
|
+
});
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}, function (target, ref) { return target == ref; });
|
|
24
|
+
}, {
|
|
25
|
+
apiName: 'adjustImageSelection',
|
|
26
|
+
});
|
|
27
|
+
return image;
|
|
28
|
+
}
|
|
29
|
+
exports.adjustImageSelection = adjustImageSelection;
|
|
30
30
|
//# sourceMappingURL=adjustImageSelection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adjustImageSelection.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/adjustImageSelection.ts"],"names":[],"mappings":";;;AAAA,0FAAyF;AACzF,2EAA4D;AAG5D;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,MAAe;IAChD,IAAI,KAAK,GAA6B,IAAI,CAAC;IAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,OAAA,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAC,MAAM,EAAE,SAAS;YACd,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;gBACpD,IAAA,2CAAa,EAAC,SAAS,EAAE,MAAM,EAAE,UAAA,OAAO;oBACpC,KAAK,GAAG,OAAO,CAAC;gBACpB,CAAC,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;IAbD,CAaC,EACL;QACI,OAAO,EAAE,sBAAsB;KAClC,CACJ,CAAC;IAEF,OAAO,KAAK,CAAC;AACjB,CAAC;AAzBD,oDAyBC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\nimport { mutateSegment } from 'roosterjs-content-model-dom';\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Adjust selection to make sure select an image if any\n * @return Content Model Image object if an image is select, or null\n */\nexport function adjustImageSelection(editor: IEditor): ContentModelImage | null {\n let image: ContentModelImage | null = null;\n\n editor.formatContentModel(\n model =>\n adjustSegmentSelection(\n model,\n (target, paragraph) => {\n if (target.isSelected && target.segmentType == 'Image') {\n mutateSegment(paragraph, target, segment => {\n image = segment;\n });\n return true;\n } else {\n return false;\n }\n },\n (target, ref) => target == ref\n ),\n {\n apiName: 'adjustImageSelection',\n }\n );\n\n return image;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"adjustImageSelection.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/adjustImageSelection.ts"],"names":[],"mappings":";;;AAAA,0FAAyF;AACzF,2EAA4D;AAG5D;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,MAAe;IAChD,IAAI,KAAK,GAA6B,IAAI,CAAC;IAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,OAAA,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAC,MAAM,EAAE,SAAS;YACd,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;gBACpD,IAAA,2CAAa,EAAC,SAAS,EAAE,MAAM,EAAE,UAAA,OAAO;oBACpC,KAAK,GAAG,OAAO,CAAC;gBACpB,CAAC,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;IAbD,CAaC,EACL;QACI,OAAO,EAAE,sBAAsB;KAClC,CACJ,CAAC;IAEF,OAAO,KAAK,CAAC;AACjB,CAAC;AAzBD,oDAyBC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\r\nimport { mutateSegment } from 'roosterjs-content-model-dom';\r\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Adjust selection to make sure select an image if any\r\n * @return Content Model Image object if an image is select, or null\r\n */\r\nexport function adjustImageSelection(editor: IEditor): ContentModelImage | null {\r\n let image: ContentModelImage | null = null;\r\n\r\n editor.formatContentModel(\r\n model =>\r\n adjustSegmentSelection(\r\n model,\r\n (target, paragraph) => {\r\n if (target.isSelected && target.segmentType == 'Image') {\r\n mutateSegment(paragraph, target, segment => {\r\n image = segment;\r\n });\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n (target, ref) => target == ref\r\n ),\r\n {\r\n apiName: 'adjustImageSelection',\r\n }\r\n );\r\n\r\n return image;\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Change the selected image src
|
|
4
|
-
* @param editor The editor instance
|
|
5
|
-
* @param file The image file
|
|
6
|
-
*/
|
|
7
|
-
export declare function changeImage(editor: IEditor, file: File): void;
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Change the selected image src
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param file The image file
|
|
6
|
+
*/
|
|
7
|
+
export declare function changeImage(editor: IEditor, file: File): void;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.changeImage = void 0;
|
|
4
|
-
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
|
|
5
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
-
/**
|
|
7
|
-
* Change the selected image src
|
|
8
|
-
* @param editor The editor instance
|
|
9
|
-
* @param file The image file
|
|
10
|
-
*/
|
|
11
|
-
function changeImage(editor, file) {
|
|
12
|
-
editor.focus();
|
|
13
|
-
var selection = editor.getDOMSelection();
|
|
14
|
-
(0, roosterjs_content_model_dom_1.readFile)(file, function (dataUrl) {
|
|
15
|
-
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
|
|
16
|
-
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'changeImage', function (image) {
|
|
17
|
-
var _a, _b;
|
|
18
|
-
var originalSrc = (_b = (_a = (0, roosterjs_content_model_dom_1.getImageMetadata)(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
|
|
19
|
-
var previousSrc = image.src;
|
|
20
|
-
image.src = dataUrl;
|
|
21
|
-
image.dataset = {};
|
|
22
|
-
image.format.width = '';
|
|
23
|
-
image.format.height = '';
|
|
24
|
-
image.alt = '';
|
|
25
|
-
editor.triggerEvent('editImage', {
|
|
26
|
-
image: selection.image,
|
|
27
|
-
previousSrc: previousSrc,
|
|
28
|
-
newSrc: dataUrl,
|
|
29
|
-
originalSrc: originalSrc,
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
exports.changeImage = changeImage;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.changeImage = void 0;
|
|
4
|
+
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
|
|
5
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
+
/**
|
|
7
|
+
* Change the selected image src
|
|
8
|
+
* @param editor The editor instance
|
|
9
|
+
* @param file The image file
|
|
10
|
+
*/
|
|
11
|
+
function changeImage(editor, file) {
|
|
12
|
+
editor.focus();
|
|
13
|
+
var selection = editor.getDOMSelection();
|
|
14
|
+
(0, roosterjs_content_model_dom_1.readFile)(file, function (dataUrl) {
|
|
15
|
+
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
|
|
16
|
+
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'changeImage', function (image) {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
var originalSrc = (_b = (_a = (0, roosterjs_content_model_dom_1.getImageMetadata)(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
|
|
19
|
+
var previousSrc = image.src;
|
|
20
|
+
image.src = dataUrl;
|
|
21
|
+
image.dataset = {};
|
|
22
|
+
image.format.width = '';
|
|
23
|
+
image.format.height = '';
|
|
24
|
+
image.alt = '';
|
|
25
|
+
editor.triggerEvent('editImage', {
|
|
26
|
+
image: selection.image,
|
|
27
|
+
previousSrc: previousSrc,
|
|
28
|
+
newSrc: dataUrl,
|
|
29
|
+
originalSrc: originalSrc,
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
exports.changeImage = changeImage;
|
|
36
36
|
//# sourceMappingURL=changeImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeImage.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/changeImage.ts"],"names":[],"mappings":";;;AAAA,oFAAmF;AACnF,2EAAyE;AAGzE;;;;GAIG;AACH,SAAgB,WAAW,CAAC,MAAe,EAAE,IAAU;IACnD,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;IAC3C,IAAA,sCAAQ,EAAC,IAAI,EAAE,UAAA,OAAO;QAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;YAChE,IAAA,yDAA2B,EAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;gBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,IAAA,8CAAgB,EAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;gBACvD,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;gBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;gBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;gBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;gBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;gBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;gBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;oBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;oBACtB,WAAW,aAAA;oBACX,MAAM,EAAE,OAAO;oBACf,WAAW,aAAA;iBACd,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;SACN;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAzBD,kCAyBC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\nimport { getImageMetadata, readFile } from 'roosterjs-content-model-dom';\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Change the selected image src\n * @param editor The editor instance\n * @param file The image file\n */\nexport function changeImage(editor: IEditor, file: File) {\n editor.focus();\n\n const selection = editor.getDOMSelection();\n readFile(file, dataUrl => {\n if (dataUrl && !editor.isDisposed() && selection?.type === 'image') {\n formatImageWithContentModel(editor, 'changeImage', (image: ContentModelImage) => {\n const originalSrc = getImageMetadata(image)?.src ?? '';\n const previousSrc = image.src;\n\n image.src = dataUrl;\n image.dataset = {};\n image.format.width = '';\n image.format.height = '';\n image.alt = '';\n\n editor.triggerEvent('editImage', {\n image: selection.image,\n previousSrc,\n newSrc: dataUrl,\n originalSrc,\n });\n });\n }\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"changeImage.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/changeImage.ts"],"names":[],"mappings":";;;AAAA,oFAAmF;AACnF,2EAAyE;AAGzE;;;;GAIG;AACH,SAAgB,WAAW,CAAC,MAAe,EAAE,IAAU;IACnD,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;IAC3C,IAAA,sCAAQ,EAAC,IAAI,EAAE,UAAA,OAAO;QAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;YAChE,IAAA,yDAA2B,EAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;gBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,IAAA,8CAAgB,EAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;gBACvD,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;gBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;gBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;gBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;gBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;gBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;gBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;oBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;oBACtB,WAAW,aAAA;oBACX,MAAM,EAAE,OAAO;oBACf,WAAW,aAAA;iBACd,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;SACN;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAzBD,kCAyBC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\r\nimport { getImageMetadata, readFile } from 'roosterjs-content-model-dom';\r\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Change the selected image src\r\n * @param editor The editor instance\r\n * @param file The image file\r\n */\r\nexport function changeImage(editor: IEditor, file: File) {\r\n editor.focus();\r\n\r\n const selection = editor.getDOMSelection();\r\n readFile(file, dataUrl => {\r\n if (dataUrl && !editor.isDisposed() && selection?.type === 'image') {\r\n formatImageWithContentModel(editor, 'changeImage', (image: ContentModelImage) => {\r\n const originalSrc = getImageMetadata(image)?.src ?? '';\r\n const previousSrc = image.src;\r\n\r\n image.src = dataUrl;\r\n image.dataset = {};\r\n image.format.width = '';\r\n image.format.height = '';\r\n image.alt = '';\r\n\r\n editor.triggerEvent('editImage', {\r\n image: selection.image,\r\n previousSrc,\r\n newSrc: dataUrl,\r\n originalSrc,\r\n });\r\n });\r\n }\r\n });\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Insert an image into current selected position
|
|
4
|
-
* @param editor The editor to operate on
|
|
5
|
-
* @param file Image Blob file or source string
|
|
6
|
-
*/
|
|
7
|
-
export declare function insertImage(editor: IEditor, imageFileOrSrc: File | string): void;
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert an image into current selected position
|
|
4
|
+
* @param editor The editor to operate on
|
|
5
|
+
* @param file Image Blob file or source string
|
|
6
|
+
*/
|
|
7
|
+
export declare function insertImage(editor: IEditor, imageFileOrSrc: File | string): void;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.insertImage = void 0;
|
|
4
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
-
/**
|
|
6
|
-
* Insert an image into current selected position
|
|
7
|
-
* @param editor The editor to operate on
|
|
8
|
-
* @param file Image Blob file or source string
|
|
9
|
-
*/
|
|
10
|
-
function insertImage(editor, imageFileOrSrc) {
|
|
11
|
-
editor.focus();
|
|
12
|
-
if (typeof imageFileOrSrc == 'string') {
|
|
13
|
-
insertImageWithSrc(editor, imageFileOrSrc);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
(0, roosterjs_content_model_dom_1.readFile)(imageFileOrSrc, function (dataUrl) {
|
|
17
|
-
if (dataUrl && !editor.isDisposed()) {
|
|
18
|
-
insertImageWithSrc(editor, dataUrl);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.insertImage = insertImage;
|
|
24
|
-
function insertImageWithSrc(editor, src) {
|
|
25
|
-
editor.formatContentModel(function (model, context) {
|
|
26
|
-
var image = (0, roosterjs_content_model_dom_1.createImage)(src, { backgroundColor: '' });
|
|
27
|
-
var doc = (0, roosterjs_content_model_dom_1.createContentModelDocument)();
|
|
28
|
-
(0, roosterjs_content_model_dom_1.addSegment)(doc, image);
|
|
29
|
-
(0, roosterjs_content_model_dom_1.mergeModel)(model, doc, context, {
|
|
30
|
-
mergeFormat: 'mergeAll',
|
|
31
|
-
});
|
|
32
|
-
image.isSelected = true;
|
|
33
|
-
(0, roosterjs_content_model_dom_1.setSelection)(model, image);
|
|
34
|
-
return true;
|
|
35
|
-
}, {
|
|
36
|
-
apiName: 'insertImage',
|
|
37
|
-
});
|
|
38
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.insertImage = void 0;
|
|
4
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
+
/**
|
|
6
|
+
* Insert an image into current selected position
|
|
7
|
+
* @param editor The editor to operate on
|
|
8
|
+
* @param file Image Blob file or source string
|
|
9
|
+
*/
|
|
10
|
+
function insertImage(editor, imageFileOrSrc) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
if (typeof imageFileOrSrc == 'string') {
|
|
13
|
+
insertImageWithSrc(editor, imageFileOrSrc);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
(0, roosterjs_content_model_dom_1.readFile)(imageFileOrSrc, function (dataUrl) {
|
|
17
|
+
if (dataUrl && !editor.isDisposed()) {
|
|
18
|
+
insertImageWithSrc(editor, dataUrl);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.insertImage = insertImage;
|
|
24
|
+
function insertImageWithSrc(editor, src) {
|
|
25
|
+
editor.formatContentModel(function (model, context) {
|
|
26
|
+
var image = (0, roosterjs_content_model_dom_1.createImage)(src, { backgroundColor: '' });
|
|
27
|
+
var doc = (0, roosterjs_content_model_dom_1.createContentModelDocument)();
|
|
28
|
+
(0, roosterjs_content_model_dom_1.addSegment)(doc, image);
|
|
29
|
+
(0, roosterjs_content_model_dom_1.mergeModel)(model, doc, context, {
|
|
30
|
+
mergeFormat: 'mergeAll',
|
|
31
|
+
});
|
|
32
|
+
image.isSelected = true;
|
|
33
|
+
(0, roosterjs_content_model_dom_1.setSelection)(model, image);
|
|
34
|
+
return true;
|
|
35
|
+
}, {
|
|
36
|
+
apiName: 'insertImage',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
39
|
//# sourceMappingURL=insertImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertImage.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/insertImage.ts"],"names":[],"mappings":";;;AAAA,2EAOqC;AAGrC;;;;GAIG;AACH,SAAgB,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,IAAA,sCAAQ,EAAC,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;AAZD,kCAYC;AAED,SAAS,kBAAkB,CAAC,MAAe,EAAE,GAAW;IACpD,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,KAAK,GAAG,IAAA,yCAAW,EAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;QAEzC,IAAA,wCAAU,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvB,IAAA,wCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;YAC5B,WAAW,EAAE,UAAU;SAC1B,CAAC,CAAC;QACH,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;QACxB,IAAA,0CAAY,EAAC,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
|
+
{"version":3,"file":"insertImage.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/insertImage.ts"],"names":[],"mappings":";;;AAAA,2EAOqC;AAGrC;;;;GAIG;AACH,SAAgB,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,IAAA,sCAAQ,EAAC,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;AAZD,kCAYC;AAED,SAAS,kBAAkB,CAAC,MAAe,EAAE,GAAW;IACpD,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,KAAK,GAAG,IAAA,yCAAW,EAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;QAEzC,IAAA,wCAAU,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvB,IAAA,wCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;YAC5B,WAAW,EAAE,UAAU;SAC1B,CAAC,CAAC;QACH,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;QACxB,IAAA,0CAAY,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAE3B,OAAO,IAAI,CAAC;IAChB,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC","sourcesContent":["import {\r\n mergeModel,\r\n readFile,\r\n addSegment,\r\n createContentModelDocument,\r\n createImage,\r\n setSelection,\r\n} from 'roosterjs-content-model-dom';\r\nimport type { IEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Insert an image into current selected position\r\n * @param editor The editor to operate on\r\n * @param file Image Blob file or source string\r\n */\r\nexport function insertImage(editor: IEditor, imageFileOrSrc: File | string) {\r\n editor.focus();\r\n\r\n if (typeof imageFileOrSrc == 'string') {\r\n insertImageWithSrc(editor, imageFileOrSrc);\r\n } else {\r\n readFile(imageFileOrSrc, dataUrl => {\r\n if (dataUrl && !editor.isDisposed()) {\r\n insertImageWithSrc(editor, dataUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction insertImageWithSrc(editor: IEditor, src: string) {\r\n editor.formatContentModel(\r\n (model, context) => {\r\n const image = createImage(src, { backgroundColor: '' });\r\n const doc = createContentModelDocument();\r\n\r\n addSegment(doc, image);\r\n mergeModel(model, doc, context, {\r\n mergeFormat: 'mergeAll',\r\n });\r\n image.isSelected = true;\r\n setSelection(model, image);\r\n\r\n return true;\r\n },\r\n {\r\n apiName: 'insertImage',\r\n }\r\n );\r\n}\r\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,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setImageAltText = void 0;
|
|
4
|
-
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
|
|
5
|
-
/**
|
|
6
|
-
* Set image alt text for all selected images at selection. If no images is contained
|
|
7
|
-
* in selection, do nothing.
|
|
8
|
-
* @param editor The editor instance
|
|
9
|
-
* @param altText The image alt text
|
|
10
|
-
*/
|
|
11
|
-
function setImageAltText(editor, altText) {
|
|
12
|
-
editor.focus();
|
|
13
|
-
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'setImageAltText', function (image) {
|
|
14
|
-
image.alt = altText;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
exports.setImageAltText = setImageAltText;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setImageAltText = void 0;
|
|
4
|
+
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
|
|
5
|
+
/**
|
|
6
|
+
* Set image alt text for all selected images at selection. If no images is contained
|
|
7
|
+
* in selection, do nothing.
|
|
8
|
+
* @param editor The editor instance
|
|
9
|
+
* @param altText The image alt text
|
|
10
|
+
*/
|
|
11
|
+
function setImageAltText(editor, altText) {
|
|
12
|
+
editor.focus();
|
|
13
|
+
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'setImageAltText', function (image) {
|
|
14
|
+
image.alt = altText;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
exports.setImageAltText = setImageAltText;
|
|
18
18
|
//# 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,oFAAmF;AAGnF;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,MAAe,EAAE,OAAe;IAC5D,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,yDAA2B,EAAC,MAAM,EAAE,iBAAiB,EAAE,UAAC,KAAwB;QAC5E,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC;AAND,0CAMC","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
|
+
{"version":3,"file":"setImageAltText.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageAltText.ts"],"names":[],"mappings":";;;AAAA,oFAAmF;AAGnF;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,MAAe,EAAE,OAAe;IAC5D,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,yDAA2B,EAAC,MAAM,EAAE,iBAAiB,EAAE,UAAC,KAAwB;QAC5E,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC;AAND,0CAMC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\r\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Set image alt text for all selected images at selection. If no images is contained\r\n * in selection, do nothing.\r\n * @param editor The editor instance\r\n * @param altText The image alt text\r\n */\r\nexport function setImageAltText(editor: IEditor, altText: string) {\r\n editor.focus();\r\n\r\n formatImageWithContentModel(editor, 'setImageAltText', (image: ContentModelImage) => {\r\n image.alt = altText;\r\n });\r\n}\r\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,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setImageBorder = void 0;
|
|
4
|
-
var applyImageBorderFormat_1 = require("../../modelApi/image/applyImageBorderFormat");
|
|
5
|
-
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
|
|
6
|
-
/**
|
|
7
|
-
* Set image border style for all selected images at selection.
|
|
8
|
-
* @param editor The editor instance
|
|
9
|
-
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
10
|
-
* its value will not be changed. Passing null instead of an object will remove the border
|
|
11
|
-
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
12
|
-
*/
|
|
13
|
-
function setImageBorder(editor, border, borderRadius) {
|
|
14
|
-
editor.focus();
|
|
15
|
-
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'setImageBorder', function (image) {
|
|
16
|
-
(0, applyImageBorderFormat_1.applyImageBorderFormat)(image, border, borderRadius);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.setImageBorder = setImageBorder;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setImageBorder = void 0;
|
|
4
|
+
var applyImageBorderFormat_1 = require("../../modelApi/image/applyImageBorderFormat");
|
|
5
|
+
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
|
|
6
|
+
/**
|
|
7
|
+
* Set image border style for all selected images at selection.
|
|
8
|
+
* @param editor The editor instance
|
|
9
|
+
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
10
|
+
* its value will not be changed. Passing null instead of an object will remove the border
|
|
11
|
+
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
12
|
+
*/
|
|
13
|
+
function setImageBorder(editor, border, borderRadius) {
|
|
14
|
+
editor.focus();
|
|
15
|
+
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'setImageBorder', function (image) {
|
|
16
|
+
(0, applyImageBorderFormat_1.applyImageBorderFormat)(image, border, borderRadius);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.setImageBorder = setImageBorder;
|
|
20
20
|
//# sourceMappingURL=setImageBorder.js.map
|