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,53 +1,77 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.insertTable = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var adjustIndentation_1 = require("../../modelApi/common/adjustIndentation");
|
|
6
|
-
var createTableStructure_1 = require("../../modelApi/table/createTableStructure");
|
|
7
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
8
|
-
/**
|
|
9
|
-
* Insert table into editor at current selection
|
|
10
|
-
* @param editor The editor instance
|
|
11
|
-
* @param columns Number of columns in table, it also controls the default table cell width:
|
|
12
|
-
* if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px
|
|
13
|
-
* @param rows Number of rows in table
|
|
14
|
-
* @param tableMetadataFormat (Optional) The table format that are stored as metadata. If not passed, the default format will be applied: background color: #FFF; border color: #ABABAB
|
|
15
|
-
* @param format (Optional) The table format used for style attributes
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
editor.
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(0,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(0, roosterjs_content_model_dom_1.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.insertTable = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var adjustIndentation_1 = require("../../modelApi/common/adjustIndentation");
|
|
6
|
+
var createTableStructure_1 = require("../../modelApi/table/createTableStructure");
|
|
7
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
8
|
+
/**
|
|
9
|
+
* Insert table into editor at current selection
|
|
10
|
+
* @param editor The editor instance
|
|
11
|
+
* @param columns Number of columns in table, it also controls the default table cell width:
|
|
12
|
+
* if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px
|
|
13
|
+
* @param rows Number of rows in table
|
|
14
|
+
* @param tableMetadataFormat (Optional) The table format that are stored as metadata. If not passed, the default format will be applied: background color: #FFF; border color: #ABABAB
|
|
15
|
+
* @param format (Optional) The table format used for style attributes
|
|
16
|
+
* @param cellFormat (Optional) custom format for table cells, except for borders styles, for borders use tableMetadataFormat
|
|
17
|
+
*/
|
|
18
|
+
function insertTable(editor, columns, rows, tableMetadataFormat, format, customCellFormat) {
|
|
19
|
+
editor.focus();
|
|
20
|
+
editor.formatContentModel(function (model, context) {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
var insertPosition = (0, roosterjs_content_model_dom_1.deleteSelection)(model, [], context).insertPoint;
|
|
23
|
+
if (insertPosition) {
|
|
24
|
+
var doc = (0, roosterjs_content_model_dom_1.createContentModelDocument)();
|
|
25
|
+
var table = (0, createTableStructure_1.createTableStructure)(doc, columns, rows, customCellFormat);
|
|
26
|
+
if (format) {
|
|
27
|
+
table.format = (0, tslib_1.__assign)({}, format);
|
|
28
|
+
}
|
|
29
|
+
(0, roosterjs_content_model_dom_1.normalizeTable)(table, editor.getPendingFormat() || insertPosition.marker.format);
|
|
30
|
+
initCellWidth(table);
|
|
31
|
+
(0, adjustIndentation_1.adjustTableIndentation)(insertPosition, table);
|
|
32
|
+
// Assign default vertical align
|
|
33
|
+
tableMetadataFormat = tableMetadataFormat || { verticalAlign: 'top' };
|
|
34
|
+
(0, roosterjs_content_model_dom_1.applyTableFormat)(table, tableMetadataFormat);
|
|
35
|
+
(0, roosterjs_content_model_dom_1.mergeModel)(model, doc, context, {
|
|
36
|
+
insertPosition: insertPosition,
|
|
37
|
+
mergeFormat: 'mergeAll',
|
|
38
|
+
});
|
|
39
|
+
var firstBlock = (_b = (_a = table.rows[0]) === null || _a === void 0 ? void 0 : _a.cells[0]) === null || _b === void 0 ? void 0 : _b.blocks[0];
|
|
40
|
+
if ((firstBlock === null || firstBlock === void 0 ? void 0 : firstBlock.blockType) == 'Paragraph') {
|
|
41
|
+
var marker = (0, roosterjs_content_model_dom_1.createSelectionMarker)((_c = firstBlock.segments[0]) === null || _c === void 0 ? void 0 : _c.format);
|
|
42
|
+
firstBlock.segments.unshift(marker);
|
|
43
|
+
(0, roosterjs_content_model_dom_1.setSelection)(model, marker);
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
apiName: 'insertTable',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
exports.insertTable = insertTable;
|
|
55
|
+
function initCellWidth(table) {
|
|
56
|
+
var columns = Math.max.apply(Math, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(table.rows.map(function (row) { return row.cells.length; })), false));
|
|
57
|
+
for (var i = 0; i < columns; i++) {
|
|
58
|
+
if (table.widths[i] === undefined) {
|
|
59
|
+
table.widths[i] = getTableCellWidth(columns);
|
|
60
|
+
}
|
|
61
|
+
else if (table.widths[i] < roosterjs_content_model_dom_1.MIN_ALLOWED_TABLE_CELL_WIDTH) {
|
|
62
|
+
table.widths[i] = roosterjs_content_model_dom_1.MIN_ALLOWED_TABLE_CELL_WIDTH;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function getTableCellWidth(columns) {
|
|
67
|
+
if (columns <= 4) {
|
|
68
|
+
return 120;
|
|
69
|
+
}
|
|
70
|
+
else if (columns <= 6) {
|
|
71
|
+
return 100;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return 70;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
53
77
|
//# sourceMappingURL=insertTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertTable.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/table/insertTable.ts"],"names":[],"mappings":";;;;AAAA,6EAAiF;AACjF,kFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"insertTable.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/table/insertTable.ts"],"names":[],"mappings":";;;;AAAA,6EAAiF;AACjF,kFAAiF;AACjF,2EASqC;AASrC;;;;;;;;;GASG;AACH,SAAgB,WAAW,CACvB,MAAe,EACf,OAAe,EACf,IAAY,EACZ,mBAAkD,EAClD,MAAgC,EAChC,gBAA8C;IAE9C,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;;QACX,IAAM,cAAc,GAAG,IAAA,6CAAe,EAAC,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC;QAEvE,IAAI,cAAc,EAAE;YAChB,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;YACzC,IAAM,KAAK,GAAG,IAAA,2CAAoB,EAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;YACzE,IAAI,MAAM,EAAE;gBACR,KAAK,CAAC,MAAM,6BAAQ,MAAM,CAAE,CAAC;aAChC;YAED,IAAA,4CAAc,EAAC,KAAK,EAAE,MAAM,CAAC,gBAAgB,EAAE,IAAI,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACjF,aAAa,CAAC,KAAK,CAAC,CAAC;YAErB,IAAA,0CAAsB,EAAC,cAAc,EAAE,KAAK,CAAC,CAAC;YAE9C,gCAAgC;YAChC,mBAAmB,GAAG,mBAAmB,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;YACtE,IAAA,8CAAgB,EAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;YAC7C,IAAA,wCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;gBAC5B,cAAc,gBAAA;gBACd,WAAW,EAAE,UAAU;aAC1B,CAAC,CAAC;YAEH,IAAM,UAAU,GAAG,MAAA,MAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC,CAAC,CAAC,CAAC;YAEtD,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,KAAI,WAAW,EAAE;gBACtC,IAAM,MAAM,GAAG,IAAA,mDAAqB,EAAC,MAAA,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC,CAAC;gBACrE,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBACpC,IAAA,0CAAY,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;aAC/B;YAED,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC;AAnDD,kCAmDC;AAED,SAAS,aAAa,CAAC,KAAwB;IAC3C,IAAM,OAAO,GAAG,IAAI,CAAC,GAAG,OAAR,IAAI,qDAAQ,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAA,GAAG,CAAC,KAAK,CAAC,MAAM,EAAhB,CAAgB,CAAC,UAAC,CAAC;IAErE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;QAC9B,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;YAC/B,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;SAChD;aAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,0DAA4B,EAAE;YACvD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,0DAA4B,CAAC;SAClD;KACJ;AACL,CAAC;AAED,SAAS,iBAAiB,CAAC,OAAe;IACtC,IAAI,OAAO,IAAI,CAAC,EAAE;QACd,OAAO,GAAG,CAAC;KACd;SAAM,IAAI,OAAO,IAAI,CAAC,EAAE;QACrB,OAAO,GAAG,CAAC;KACd;SAAM;QACH,OAAO,EAAE,CAAC;KACb;AACL,CAAC","sourcesContent":["import { adjustTableIndentation } from '../../modelApi/common/adjustIndentation';\r\nimport { createTableStructure } from '../../modelApi/table/createTableStructure';\r\nimport {\r\n createContentModelDocument,\r\n createSelectionMarker,\r\n applyTableFormat,\r\n deleteSelection,\r\n mergeModel,\r\n normalizeTable,\r\n setSelection,\r\n MIN_ALLOWED_TABLE_CELL_WIDTH,\r\n} from 'roosterjs-content-model-dom';\r\nimport type {\r\n ContentModelTable,\r\n ContentModelTableFormat,\r\n IEditor,\r\n TableMetadataFormat,\r\n ContentModelTableCellFormat,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Insert table into editor at current selection\r\n * @param editor The editor instance\r\n * @param columns Number of columns in table, it also controls the default table cell width:\r\n * if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px\r\n * @param rows Number of rows in table\r\n * @param tableMetadataFormat (Optional) The table format that are stored as metadata. If not passed, the default format will be applied: background color: #FFF; border color: #ABABAB\r\n * @param format (Optional) The table format used for style attributes\r\n * @param cellFormat (Optional) custom format for table cells, except for borders styles, for borders use tableMetadataFormat\r\n */\r\nexport function insertTable(\r\n editor: IEditor,\r\n columns: number,\r\n rows: number,\r\n tableMetadataFormat?: Partial<TableMetadataFormat>,\r\n format?: ContentModelTableFormat,\r\n customCellFormat?: ContentModelTableCellFormat\r\n) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n (model, context) => {\r\n const insertPosition = deleteSelection(model, [], context).insertPoint;\r\n\r\n if (insertPosition) {\r\n const doc = createContentModelDocument();\r\n const table = createTableStructure(doc, columns, rows, customCellFormat);\r\n if (format) {\r\n table.format = { ...format };\r\n }\r\n\r\n normalizeTable(table, editor.getPendingFormat() || insertPosition.marker.format);\r\n initCellWidth(table);\r\n\r\n adjustTableIndentation(insertPosition, table);\r\n\r\n // Assign default vertical align\r\n tableMetadataFormat = tableMetadataFormat || { verticalAlign: 'top' };\r\n applyTableFormat(table, tableMetadataFormat);\r\n mergeModel(model, doc, context, {\r\n insertPosition,\r\n mergeFormat: 'mergeAll',\r\n });\r\n\r\n const firstBlock = table.rows[0]?.cells[0]?.blocks[0];\r\n\r\n if (firstBlock?.blockType == 'Paragraph') {\r\n const marker = createSelectionMarker(firstBlock.segments[0]?.format);\r\n firstBlock.segments.unshift(marker);\r\n setSelection(model, marker);\r\n }\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n {\r\n apiName: 'insertTable',\r\n }\r\n );\r\n}\r\n\r\nfunction initCellWidth(table: ContentModelTable) {\r\n const columns = Math.max(...table.rows.map(row => row.cells.length));\r\n\r\n for (let i = 0; i < columns; i++) {\r\n if (table.widths[i] === undefined) {\r\n table.widths[i] = getTableCellWidth(columns);\r\n } else if (table.widths[i] < MIN_ALLOWED_TABLE_CELL_WIDTH) {\r\n table.widths[i] = MIN_ALLOWED_TABLE_CELL_WIDTH;\r\n }\r\n }\r\n}\r\n\r\nfunction getTableCellWidth(columns: number): number {\r\n if (columns <= 4) {\r\n return 120;\r\n } else if (columns <= 6) {\r\n return 100;\r\n } else {\r\n return 70;\r\n }\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set table cell shade color
|
|
4
|
-
* @param editor The editor instance
|
|
5
|
-
* @param color The color to set. Pass null to remove existing shade color
|
|
6
|
-
*/
|
|
7
|
-
export declare function setTableCellShade(editor: IEditor, color: string | null): void;
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set table cell shade color
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param color The color to set. Pass null to remove existing shade color
|
|
6
|
+
*/
|
|
7
|
+
export declare function setTableCellShade(editor: IEditor, color: string | null): void;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setTableCellShade = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
-
/**
|
|
7
|
-
* Set table cell shade color
|
|
8
|
-
* @param editor The editor instance
|
|
9
|
-
* @param color The color to set. Pass null to remove existing shade color
|
|
10
|
-
*/
|
|
11
|
-
function setTableCellShade(editor, color) {
|
|
12
|
-
editor.focus();
|
|
13
|
-
editor.formatContentModel(function (model) {
|
|
14
|
-
var _a = (0, tslib_1.__read)((0, roosterjs_content_model_dom_1.getFirstSelectedTable)(model), 1), table = _a[0];
|
|
15
|
-
if (table) {
|
|
16
|
-
table.rows.forEach(function (row) {
|
|
17
|
-
return row.cells.forEach(function (cell) {
|
|
18
|
-
if ((0, roosterjs_content_model_dom_1.hasSelectionInBlockGroup)(cell)) {
|
|
19
|
-
(0, roosterjs_content_model_dom_1.setTableCellBackgroundColor)((0, roosterjs_content_model_dom_1.mutateBlock)(cell), color, true /*isColorOverride*/);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
}, {
|
|
29
|
-
apiName: 'setTableCellShade',
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
exports.setTableCellShade = setTableCellShade;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setTableCellShade = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
6
|
+
/**
|
|
7
|
+
* Set table cell shade color
|
|
8
|
+
* @param editor The editor instance
|
|
9
|
+
* @param color The color to set. Pass null to remove existing shade color
|
|
10
|
+
*/
|
|
11
|
+
function setTableCellShade(editor, color) {
|
|
12
|
+
editor.focus();
|
|
13
|
+
editor.formatContentModel(function (model) {
|
|
14
|
+
var _a = (0, tslib_1.__read)((0, roosterjs_content_model_dom_1.getFirstSelectedTable)(model), 1), table = _a[0];
|
|
15
|
+
if (table) {
|
|
16
|
+
table.rows.forEach(function (row) {
|
|
17
|
+
return row.cells.forEach(function (cell) {
|
|
18
|
+
if ((0, roosterjs_content_model_dom_1.hasSelectionInBlockGroup)(cell)) {
|
|
19
|
+
(0, roosterjs_content_model_dom_1.setTableCellBackgroundColor)((0, roosterjs_content_model_dom_1.mutateBlock)(cell), color, true /*isColorOverride*/);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
apiName: 'setTableCellShade',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.setTableCellShade = setTableCellShade;
|
|
33
33
|
//# sourceMappingURL=setTableCellShade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setTableCellShade.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/table/setTableCellShade.ts"],"names":[],"mappings":";;;;AAAA,2EAKqC;AAGrC;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,MAAe,EAAE,KAAoB;IACnE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAU,IAAA,mDAAqB,EAAC,KAAK,CAAC,IAAA,EAArC,KAAK,QAAgC,CAAC;QAE7C,IAAI,KAAK,EAAE;YACP,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;gBAClB,OAAA,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;oBAClB,IAAI,IAAA,sDAAwB,EAAC,IAAI,CAAC,EAAE;wBAChC,IAAA,yDAA2B,EACvB,IAAA,yCAAW,EAAC,IAAI,CAAC,EACjB,KAAK,EACL,IAAI,CAAC,mBAAmB,CAC3B,CAAC;qBACL;gBACL,CAAC,CAAC;YARF,CAQE,CACL,CAAC;YAEF,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,EAAE,mBAAmB;KAC/B,CACJ,CAAC;AACN,CAAC;AA7BD,8CA6BC","sourcesContent":["import {\n hasSelectionInBlockGroup,\n getFirstSelectedTable,\n setTableCellBackgroundColor,\n mutateBlock,\n} from 'roosterjs-content-model-dom';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set table cell shade color\n * @param editor The editor instance\n * @param color The color to set. Pass null to remove existing shade color\n */\nexport function setTableCellShade(editor: IEditor, color: string | null) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n const [table] = getFirstSelectedTable(model);\n\n if (table) {\n table.rows.forEach(row =>\n row.cells.forEach(cell => {\n if (hasSelectionInBlockGroup(cell)) {\n setTableCellBackgroundColor(\n mutateBlock(cell),\n color,\n true /*isColorOverride*/\n );\n }\n })\n );\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName: 'setTableCellShade',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setTableCellShade.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/table/setTableCellShade.ts"],"names":[],"mappings":";;;;AAAA,2EAKqC;AAGrC;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,MAAe,EAAE,KAAoB;IACnE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAU,IAAA,mDAAqB,EAAC,KAAK,CAAC,IAAA,EAArC,KAAK,QAAgC,CAAC;QAE7C,IAAI,KAAK,EAAE;YACP,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;gBAClB,OAAA,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;oBAClB,IAAI,IAAA,sDAAwB,EAAC,IAAI,CAAC,EAAE;wBAChC,IAAA,yDAA2B,EACvB,IAAA,yCAAW,EAAC,IAAI,CAAC,EACjB,KAAK,EACL,IAAI,CAAC,mBAAmB,CAC3B,CAAC;qBACL;gBACL,CAAC,CAAC;YARF,CAQE,CACL,CAAC;YAEF,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,EAAE,mBAAmB;KAC/B,CACJ,CAAC;AACN,CAAC;AA7BD,8CA6BC","sourcesContent":["import {\r\n hasSelectionInBlockGroup,\r\n getFirstSelectedTable,\r\n setTableCellBackgroundColor,\r\n mutateBlock,\r\n} from 'roosterjs-content-model-dom';\r\nimport type { IEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Set table cell shade color\r\n * @param editor The editor instance\r\n * @param color The color to set. Pass null to remove existing shade color\r\n */\r\nexport function setTableCellShade(editor: IEditor, color: string | null) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n const [table] = getFirstSelectedTable(model);\r\n\r\n if (table) {\r\n table.rows.forEach(row =>\r\n row.cells.forEach(cell => {\r\n if (hasSelectionInBlockGroup(cell)) {\r\n setTableCellBackgroundColor(\r\n mutateBlock(cell),\r\n color,\r\n true /*isColorOverride*/\r\n );\r\n }\r\n })\r\n );\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n {\r\n apiName: 'setTableCellShade',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ContentModelEntity, EditorContext, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Create an EditorContext for an entity
|
|
4
|
-
* @param editor The editor object
|
|
5
|
-
* @param entity The entity to create the context for
|
|
6
|
-
* @returns The generated EditorContext for the entity
|
|
7
|
-
*/
|
|
8
|
-
export declare function createEditorContextForEntity(editor: IEditor, entity: ContentModelEntity): EditorContext;
|
|
1
|
+
import type { ContentModelEntity, EditorContext, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Create an EditorContext for an entity
|
|
4
|
+
* @param editor The editor object
|
|
5
|
+
* @param entity The entity to create the context for
|
|
6
|
+
* @returns The generated EditorContext for the entity
|
|
7
|
+
*/
|
|
8
|
+
export declare function createEditorContextForEntity(editor: IEditor, entity: ContentModelEntity): EditorContext;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createEditorContextForEntity = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
/**
|
|
6
|
-
* Create an EditorContext for an entity
|
|
7
|
-
* @param editor The editor object
|
|
8
|
-
* @param entity The entity to create the context for
|
|
9
|
-
* @returns The generated EditorContext for the entity
|
|
10
|
-
*/
|
|
11
|
-
function createEditorContextForEntity(editor, entity) {
|
|
12
|
-
var _a;
|
|
13
|
-
var domHelper = editor.getDOMHelper();
|
|
14
|
-
var context = {
|
|
15
|
-
isDarkMode: editor.isDarkMode(),
|
|
16
|
-
defaultFormat: (0, tslib_1.__assign)({}, entity.format),
|
|
17
|
-
darkColorHandler: editor.getColorManager(),
|
|
18
|
-
addDelimiterForEntity: false,
|
|
19
|
-
allowCacheElement: false,
|
|
20
|
-
domIndexer: undefined,
|
|
21
|
-
zoomScale: domHelper.calculateZoomScale(),
|
|
22
|
-
experimentalFeatures: [],
|
|
23
|
-
};
|
|
24
|
-
if (((_a = editor.getDocument().defaultView) === null || _a === void 0 ? void 0 : _a.getComputedStyle(entity.wrapper).direction) == 'rtl') {
|
|
25
|
-
context.isRootRtl = true;
|
|
26
|
-
}
|
|
27
|
-
return context;
|
|
28
|
-
}
|
|
29
|
-
exports.createEditorContextForEntity = createEditorContextForEntity;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEditorContextForEntity = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Create an EditorContext for an entity
|
|
7
|
+
* @param editor The editor object
|
|
8
|
+
* @param entity The entity to create the context for
|
|
9
|
+
* @returns The generated EditorContext for the entity
|
|
10
|
+
*/
|
|
11
|
+
function createEditorContextForEntity(editor, entity) {
|
|
12
|
+
var _a;
|
|
13
|
+
var domHelper = editor.getDOMHelper();
|
|
14
|
+
var context = {
|
|
15
|
+
isDarkMode: editor.isDarkMode(),
|
|
16
|
+
defaultFormat: (0, tslib_1.__assign)({}, entity.format),
|
|
17
|
+
darkColorHandler: editor.getColorManager(),
|
|
18
|
+
addDelimiterForEntity: false,
|
|
19
|
+
allowCacheElement: false,
|
|
20
|
+
domIndexer: undefined,
|
|
21
|
+
zoomScale: domHelper.calculateZoomScale(),
|
|
22
|
+
experimentalFeatures: [],
|
|
23
|
+
};
|
|
24
|
+
if (((_a = editor.getDocument().defaultView) === null || _a === void 0 ? void 0 : _a.getComputedStyle(entity.wrapper).direction) == 'rtl') {
|
|
25
|
+
context.isRootRtl = true;
|
|
26
|
+
}
|
|
27
|
+
return context;
|
|
28
|
+
}
|
|
29
|
+
exports.createEditorContextForEntity = createEditorContextForEntity;
|
|
30
30
|
//# sourceMappingURL=createEditorContextForEntity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEditorContextForEntity.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/createEditorContextForEntity.ts"],"names":[],"mappings":";;;;AAEA;;;;;GAKG;AACH,SAAgB,4BAA4B,CACxC,MAAe,EACf,MAA0B;;IAE1B,IAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;IACxC,IAAM,OAAO,GAAkB;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;QAC/B,aAAa,4BAAO,MAAM,CAAC,MAAM,CAAE;QACnC,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE;QAC1C,qBAAqB,EAAE,KAAK;QAC5B,iBAAiB,EAAE,KAAK;QACxB,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,SAAS,CAAC,kBAAkB,EAAE;QACzC,oBAAoB,EAAE,EAAE;KAC3B,CAAC;IAEF,IAAI,CAAA,MAAA,MAAM,CAAC,WAAW,EAAE,CAAC,WAAW,0CAAE,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,KAAI,KAAK,EAAE;QACvF,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;KAC5B;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AArBD,oEAqBC","sourcesContent":["import type { ContentModelEntity, EditorContext, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Create an EditorContext for an entity\n * @param editor The editor object\n * @param entity The entity to create the context for\n * @returns The generated EditorContext for the entity\n */\nexport function createEditorContextForEntity(\n editor: IEditor,\n entity: ContentModelEntity\n): EditorContext {\n const domHelper = editor.getDOMHelper();\n const context: EditorContext = {\n isDarkMode: editor.isDarkMode(),\n defaultFormat: { ...entity.format },\n darkColorHandler: editor.getColorManager(),\n addDelimiterForEntity: false,\n allowCacheElement: false,\n domIndexer: undefined,\n zoomScale: domHelper.calculateZoomScale(),\n experimentalFeatures: [],\n };\n\n if (editor.getDocument().defaultView?.getComputedStyle(entity.wrapper).direction == 'rtl') {\n context.isRootRtl = true;\n }\n\n return context;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"createEditorContextForEntity.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/createEditorContextForEntity.ts"],"names":[],"mappings":";;;;AAEA;;;;;GAKG;AACH,SAAgB,4BAA4B,CACxC,MAAe,EACf,MAA0B;;IAE1B,IAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;IACxC,IAAM,OAAO,GAAkB;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;QAC/B,aAAa,4BAAO,MAAM,CAAC,MAAM,CAAE;QACnC,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE;QAC1C,qBAAqB,EAAE,KAAK;QAC5B,iBAAiB,EAAE,KAAK;QACxB,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,SAAS,CAAC,kBAAkB,EAAE;QACzC,oBAAoB,EAAE,EAAE;KAC3B,CAAC;IAEF,IAAI,CAAA,MAAA,MAAM,CAAC,WAAW,EAAE,CAAC,WAAW,0CAAE,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,KAAI,KAAK,EAAE;QACvF,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;KAC5B;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AArBD,oEAqBC","sourcesContent":["import type { ContentModelEntity, EditorContext, IEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Create an EditorContext for an entity\r\n * @param editor The editor object\r\n * @param entity The entity to create the context for\r\n * @returns The generated EditorContext for the entity\r\n */\r\nexport function createEditorContextForEntity(\r\n editor: IEditor,\r\n entity: ContentModelEntity\r\n): EditorContext {\r\n const domHelper = editor.getDOMHelper();\r\n const context: EditorContext = {\r\n isDarkMode: editor.isDarkMode(),\r\n defaultFormat: { ...entity.format },\r\n darkColorHandler: editor.getColorManager(),\r\n addDelimiterForEntity: false,\r\n allowCacheElement: false,\r\n domIndexer: undefined,\r\n zoomScale: domHelper.calculateZoomScale(),\r\n experimentalFeatures: [],\r\n };\r\n\r\n if (editor.getDocument().defaultView?.getComputedStyle(entity.wrapper).direction == 'rtl') {\r\n context.isRootRtl = true;\r\n }\r\n\r\n return context;\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Invoke a callback to format the selected image using Content Model
|
|
4
|
-
* @param editor The editor object
|
|
5
|
-
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
6
|
-
* @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.
|
|
7
|
-
*/
|
|
8
|
-
export declare function formatImageWithContentModel(editor: IEditor, apiName: string, callback: (segment: ContentModelImage) => void): void;
|
|
1
|
+
import type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Invoke a callback to format the selected image using Content Model
|
|
4
|
+
* @param editor The editor object
|
|
5
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
6
|
+
* @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatImageWithContentModel(editor: IEditor, apiName: string, callback: (segment: ContentModelImage) => void): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatImageWithContentModel = void 0;
|
|
4
|
-
var formatSegmentWithContentModel_1 = require("./formatSegmentWithContentModel");
|
|
5
|
-
/**
|
|
6
|
-
* Invoke a callback to format the selected image using Content Model
|
|
7
|
-
* @param editor The editor object
|
|
8
|
-
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
9
|
-
* @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.
|
|
10
|
-
*/
|
|
11
|
-
function formatImageWithContentModel(editor, apiName, callback) {
|
|
12
|
-
(0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, apiName, function (_, __, segment) {
|
|
13
|
-
if ((segment === null || segment === void 0 ? void 0 : segment.segmentType) == 'Image') {
|
|
14
|
-
callback(segment);
|
|
15
|
-
}
|
|
16
|
-
}, undefined /** segmentHasStyleCallback **/, undefined /** includingFormatHolder */);
|
|
17
|
-
}
|
|
18
|
-
exports.formatImageWithContentModel = formatImageWithContentModel;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatImageWithContentModel = void 0;
|
|
4
|
+
var formatSegmentWithContentModel_1 = require("./formatSegmentWithContentModel");
|
|
5
|
+
/**
|
|
6
|
+
* Invoke a callback to format the selected image using Content Model
|
|
7
|
+
* @param editor The editor object
|
|
8
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
9
|
+
* @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.
|
|
10
|
+
*/
|
|
11
|
+
function formatImageWithContentModel(editor, apiName, callback) {
|
|
12
|
+
(0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, apiName, function (_, __, segment) {
|
|
13
|
+
if ((segment === null || segment === void 0 ? void 0 : segment.segmentType) == 'Image') {
|
|
14
|
+
callback(segment);
|
|
15
|
+
}
|
|
16
|
+
}, undefined /** segmentHasStyleCallback **/, undefined /** includingFormatHolder */);
|
|
17
|
+
}
|
|
18
|
+
exports.formatImageWithContentModel = formatImageWithContentModel;
|
|
19
19
|
//# sourceMappingURL=formatImageWithContentModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatImageWithContentModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/formatImageWithContentModel.ts"],"names":[],"mappings":";;;AAAA,iFAAgF;AAGhF;;;;;GAKG;AACH,SAAgB,2BAA2B,CACvC,MAAe,EACf,OAAe,EACf,QAA8C;IAE9C,IAAA,6DAA6B,EACzB,MAAM,EACN,OAAO,EACP,UAAC,CAAC,EAAE,EAAE,EAAE,OAAO;QACX,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,OAAO,EAAE;YACjC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACrB;IACL,CAAC,EACD,SAAS,CAAC,+BAA+B,EACzC,SAAS,CAAC,4BAA4B,CACzC,CAAC;AACN,CAAC;AAhBD,kEAgBC","sourcesContent":["import { formatSegmentWithContentModel } from './formatSegmentWithContentModel';\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Invoke a callback to format the selected image using Content Model\n * @param editor The editor object\n * @param apiName Name of API this calling this function. This is mostly for logging.\n * @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.\n */\nexport function formatImageWithContentModel(\n editor: IEditor,\n apiName: string,\n callback: (segment: ContentModelImage) => void\n) {\n formatSegmentWithContentModel(\n editor,\n apiName,\n (_, __, segment) => {\n if (segment?.segmentType == 'Image') {\n callback(segment);\n }\n },\n undefined /** segmentHasStyleCallback **/,\n undefined /** includingFormatHolder */\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"formatImageWithContentModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/formatImageWithContentModel.ts"],"names":[],"mappings":";;;AAAA,iFAAgF;AAGhF;;;;;GAKG;AACH,SAAgB,2BAA2B,CACvC,MAAe,EACf,OAAe,EACf,QAA8C;IAE9C,IAAA,6DAA6B,EACzB,MAAM,EACN,OAAO,EACP,UAAC,CAAC,EAAE,EAAE,EAAE,OAAO;QACX,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,OAAO,EAAE;YACjC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACrB;IACL,CAAC,EACD,SAAS,CAAC,+BAA+B,EACzC,SAAS,CAAC,4BAA4B,CACzC,CAAC;AACN,CAAC;AAhBD,kEAgBC","sourcesContent":["import { formatSegmentWithContentModel } from './formatSegmentWithContentModel';\r\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Invoke a callback to format the selected image using Content Model\r\n * @param editor The editor object\r\n * @param apiName Name of API this calling this function. This is mostly for logging.\r\n * @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.\r\n */\r\nexport function formatImageWithContentModel(\r\n editor: IEditor,\r\n apiName: string,\r\n callback: (segment: ContentModelImage) => void\r\n) {\r\n formatSegmentWithContentModel(\r\n editor,\r\n apiName,\r\n (_, __, segment) => {\r\n if (segment?.segmentType == 'Image') {\r\n callback(segment);\r\n }\r\n },\r\n undefined /** segmentHasStyleCallback **/,\r\n undefined /** includingFormatHolder */\r\n );\r\n}\r\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { DOMInsertPoint, FormatContentModelOptions, IEditor, InsertPoint, FormatContentModelContext, ShallowMutableContentModelDocument } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Invoke a callback to format the content in a specific position using Content Model
|
|
4
|
-
* @param editor The editor object
|
|
5
|
-
* @param insertPoint The insert position.
|
|
6
|
-
* @param callback The callback to insert the format.
|
|
7
|
-
* @param options More options, @see FormatContentModelOptions
|
|
8
|
-
*/
|
|
9
|
-
export declare function formatInsertPointWithContentModel(editor: IEditor, insertPoint: DOMInsertPoint, callback: (model: ShallowMutableContentModelDocument, context: FormatContentModelContext, insertPoint?: InsertPoint) => void, options?: FormatContentModelOptions): void;
|
|
1
|
+
import type { DOMInsertPoint, FormatContentModelOptions, IEditor, InsertPoint, FormatContentModelContext, ShallowMutableContentModelDocument } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Invoke a callback to format the content in a specific position using Content Model
|
|
4
|
+
* @param editor The editor object
|
|
5
|
+
* @param insertPoint The insert position.
|
|
6
|
+
* @param callback The callback to insert the format.
|
|
7
|
+
* @param options More options, @see FormatContentModelOptions
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatInsertPointWithContentModel(editor: IEditor, insertPoint: DOMInsertPoint, callback: (model: ShallowMutableContentModelDocument, context: FormatContentModelContext, insertPoint?: InsertPoint) => void, options?: FormatContentModelOptions): void;
|