roosterjs-content-model-api 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +48 -48
- package/lib/index.js +99 -99
- package/lib/index.js.map +1 -1
- package/lib/modelApi/block/setModelAlignment.d.ts +5 -5
- package/lib/modelApi/block/setModelAlignment.js +62 -62
- package/lib/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib/modelApi/block/setModelDirection.d.ts +5 -5
- package/lib/modelApi/block/setModelDirection.js +68 -68
- package/lib/modelApi/block/setModelDirection.js.map +1 -1
- package/lib/modelApi/block/setModelIndentation.d.ts +8 -8
- package/lib/modelApi/block/setModelIndentation.js +138 -138
- package/lib/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib/modelApi/block/toggleModelBlockQuote.js +50 -50
- package/lib/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib/modelApi/common/clearModelFormat.js +129 -129
- package/lib/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib/modelApi/common/wrapBlock.js +48 -48
- package/lib/modelApi/common/wrapBlock.js.map +1 -1
- package/lib/modelApi/entity/insertEntityModel.d.ts +5 -5
- package/lib/modelApi/entity/insertEntityModel.js +79 -79
- 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/matchLink.d.ts +29 -29
- package/lib/modelApi/link/matchLink.js +94 -94
- package/lib/modelApi/link/matchLink.js.map +1 -1
- package/lib/modelApi/list/findListItemsInSameThread.d.ts +7 -7
- package/lib/modelApi/list/findListItemsInSameThread.js +114 -114
- package/lib/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib/modelApi/list/setListType.d.ts +7 -7
- package/lib/modelApi/list/setListType.js +113 -113
- package/lib/modelApi/list/setListType.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 +55 -55
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib/modelApi/selection/adjustWordSelection.d.ts +5 -5
- package/lib/modelApi/selection/adjustWordSelection.js +121 -121
- 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 +12 -12
- package/lib/modelApi/table/alignTable.js.map +1 -1
- package/lib/modelApi/table/alignTableCell.d.ts +9 -9
- package/lib/modelApi/table/alignTableCell.js +58 -58
- 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 +8 -8
- package/lib/modelApi/table/clearSelectedCells.js +26 -26
- 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 +11 -11
- 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 +28 -28
- package/lib/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib/modelApi/table/insertTableRow.d.ts +7 -7
- package/lib/modelApi/table/insertTableRow.js +32 -32
- package/lib/modelApi/table/insertTableRow.js.map +1 -1
- package/lib/modelApi/table/mergeTableCells.d.ts +5 -5
- package/lib/modelApi/table/mergeTableCells.js +26 -26
- package/lib/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib/modelApi/table/mergeTableColumn.d.ts +5 -5
- package/lib/modelApi/table/mergeTableColumn.js +37 -37
- package/lib/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib/modelApi/table/mergeTableRow.d.ts +5 -5
- package/lib/modelApi/table/mergeTableRow.js +38 -38
- 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 +57 -57
- package/lib/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib/publicApi/block/setAlignment.d.ts +7 -7
- package/lib/publicApi/block/setAlignment.js +15 -15
- package/lib/publicApi/block/setAlignment.js.map +1 -1
- package/lib/publicApi/block/setDirection.d.ts +7 -7
- package/lib/publicApi/block/setDirection.js +15 -15
- package/lib/publicApi/block/setDirection.js.map +1 -1
- package/lib/publicApi/block/setHeadingLevel.d.ts +7 -7
- package/lib/publicApi/block/setHeadingLevel.js +49 -49
- package/lib/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib/publicApi/block/setIndentation.d.ts +8 -8
- package/lib/publicApi/block/setIndentation.js +24 -24
- package/lib/publicApi/block/setIndentation.js.map +1 -1
- package/lib/publicApi/block/setParagraphMargin.d.ts +9 -9
- package/lib/publicApi/block/setParagraphMargin.js +32 -32
- package/lib/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib/publicApi/block/setSpacing.d.ts +7 -7
- package/lib/publicApi/block/setSpacing.js +20 -20
- package/lib/publicApi/block/setSpacing.js.map +1 -1
- package/lib/publicApi/block/toggleBlockQuote.d.ts +9 -9
- package/lib/publicApi/block/toggleBlockQuote.js +38 -38
- package/lib/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib/publicApi/entity/insertEntity.d.ts +25 -25
- package/lib/publicApi/entity/insertEntity.js +41 -41
- package/lib/publicApi/entity/insertEntity.js.map +1 -1
- package/lib/publicApi/format/clearFormat.d.ts +6 -6
- package/lib/publicApi/format/clearFormat.js +22 -22
- package/lib/publicApi/format/clearFormat.js.map +1 -1
- package/lib/publicApi/format/getFormatState.d.ts +6 -6
- package/lib/publicApi/format/getFormatState.js +20 -20
- package/lib/publicApi/format/getFormatState.js.map +1 -1
- package/lib/publicApi/image/adjustImageSelection.d.ts +6 -6
- package/lib/publicApi/image/adjustImageSelection.js +25 -25
- package/lib/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib/publicApi/image/changeImage.d.ts +7 -7
- package/lib/publicApi/image/changeImage.js +34 -34
- package/lib/publicApi/image/changeImage.js.map +1 -1
- package/lib/publicApi/image/insertImage.d.ts +7 -7
- package/lib/publicApi/image/insertImage.js +36 -36
- package/lib/publicApi/image/insertImage.js.map +1 -1
- package/lib/publicApi/image/setImageAltText.d.ts +8 -8
- package/lib/publicApi/image/setImageAltText.js +16 -16
- package/lib/publicApi/image/setImageAltText.js.map +1 -1
- package/lib/publicApi/image/setImageBorder.d.ts +9 -9
- package/lib/publicApi/image/setImageBorder.js +18 -18
- package/lib/publicApi/image/setImageBorder.js.map +1 -1
- package/lib/publicApi/image/setImageBoxShadow.d.ts +8 -8
- package/lib/publicApi/image/setImageBoxShadow.js +28 -28
- package/lib/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib/publicApi/link/adjustLinkSelection.d.ts +6 -6
- package/lib/publicApi/link/adjustLinkSelection.js +33 -33
- package/lib/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib/publicApi/link/insertLink.d.ts +15 -15
- package/lib/publicApi/link/insertLink.js +119 -119
- package/lib/publicApi/link/insertLink.js.map +1 -1
- package/lib/publicApi/link/removeLink.d.ts +8 -8
- package/lib/publicApi/link/removeLink.js +31 -31
- package/lib/publicApi/link/removeLink.js.map +1 -1
- package/lib/publicApi/list/setListStartNumber.d.ts +7 -7
- package/lib/publicApi/list/setListStartNumber.js +25 -25
- package/lib/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib/publicApi/list/setListStyle.d.ts +7 -7
- package/lib/publicApi/list/setListStyle.js +32 -32
- package/lib/publicApi/list/setListStyle.js.map +1 -1
- package/lib/publicApi/list/toggleBullet.d.ts +8 -8
- package/lib/publicApi/list/toggleBullet.js +19 -19
- package/lib/publicApi/list/toggleBullet.js.map +1 -1
- package/lib/publicApi/list/toggleNumbering.d.ts +8 -8
- package/lib/publicApi/list/toggleNumbering.js +19 -19
- package/lib/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib/publicApi/segment/applySegmentFormat.d.ts +7 -7
- package/lib/publicApi/segment/applySegmentFormat.js +22 -22
- package/lib/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib/publicApi/segment/changeCapitalization.d.ts +10 -10
- package/lib/publicApi/segment/changeCapitalization.js +48 -48
- package/lib/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib/publicApi/segment/changeFontSize.js +61 -61
- 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 +18 -18
- 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 +25 -25
- package/lib/publicApi/segment/setTextColor.js.map +1 -1
- package/lib/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib/publicApi/segment/toggleBold.js +20 -20
- package/lib/publicApi/segment/toggleBold.js.map +1 -1
- package/lib/publicApi/segment/toggleCode.d.ts +6 -6
- package/lib/publicApi/segment/toggleCode.js +27 -27
- package/lib/publicApi/segment/toggleCode.js.map +1 -1
- package/lib/publicApi/segment/toggleItalic.d.ts +6 -6
- package/lib/publicApi/segment/toggleItalic.js +14 -14
- package/lib/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib/publicApi/segment/toggleStrikethrough.d.ts +6 -6
- package/lib/publicApi/segment/toggleStrikethrough.js +14 -14
- package/lib/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib/publicApi/segment/toggleSubscript.d.ts +6 -6
- package/lib/publicApi/segment/toggleSubscript.js +14 -14
- package/lib/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib/publicApi/segment/toggleSuperscript.d.ts +6 -6
- package/lib/publicApi/segment/toggleSuperscript.js +14 -14
- package/lib/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib/publicApi/segment/toggleUnderline.d.ts +6 -6
- package/lib/publicApi/segment/toggleUnderline.js +18 -18
- package/lib/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib/publicApi/table/applyTableBorderFormat.d.ts +8 -8
- package/lib/publicApi/table/applyTableBorderFormat.js +293 -293
- package/lib/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib/publicApi/table/editTable.d.ts +7 -7
- package/lib/publicApi/table/editTable.js +77 -77
- package/lib/publicApi/table/editTable.js.map +1 -1
- package/lib/publicApi/table/formatTable.d.ts +8 -8
- package/lib/publicApi/table/formatTable.js +37 -37
- package/lib/publicApi/table/formatTable.js.map +1 -1
- package/lib/publicApi/table/insertTable.d.ts +11 -11
- package/lib/publicApi/table/insertTable.js +46 -46
- 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/formatImageWithContentModel.d.ts +5 -5
- package/lib/publicApi/utils/formatImageWithContentModel.js +14 -14
- package/lib/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
- package/lib/publicApi/utils/formatParagraphWithContentModel.js +18 -18
- package/lib/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
- package/lib/publicApi/utils/formatSegmentWithContentModel.js +46 -46
- package/lib/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
- package/lib/publicApi/utils/formatTableWithContentModel.js +43 -43
- package/lib/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-amd/index.d.ts +48 -48
- package/lib-amd/index.js +53 -53
- 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 +62 -62
- 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 +68 -68
- 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 +137 -137
- package/lib-amd/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-amd/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js +49 -49
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-amd/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib-amd/modelApi/common/clearModelFormat.js +127 -127
- package/lib-amd/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-amd/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib-amd/modelApi/common/wrapBlock.js +48 -48
- 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 +78 -78
- 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 +57 -57
- package/lib-amd/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-amd/modelApi/link/matchLink.d.ts +29 -29
- package/lib-amd/modelApi/link/matchLink.js +94 -94
- package/lib-amd/modelApi/link/matchLink.js.map +1 -1
- package/lib-amd/modelApi/list/findListItemsInSameThread.d.ts +7 -7
- package/lib-amd/modelApi/list/findListItemsInSameThread.js +116 -116
- package/lib-amd/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-amd/modelApi/list/setListType.d.ts +7 -7
- package/lib-amd/modelApi/list/setListType.js +113 -113
- package/lib-amd/modelApi/list/setListType.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 +54 -54
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustWordSelection.d.ts +5 -5
- package/lib-amd/modelApi/selection/adjustWordSelection.js +120 -120
- 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 +14 -14
- 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 +59 -59
- 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 +8 -8
- package/lib-amd/modelApi/table/clearSelectedCells.js +27 -27
- 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 +13 -13
- 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 +26 -26
- 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 +37 -37
- 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 +38 -38
- 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 +53 -53
- 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 +56 -56
- 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 +16 -16
- 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 +16 -16
- 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 +50 -50
- 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 +24 -24
- 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 +32 -32
- 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 +21 -21
- 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 +38 -38
- 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 +40 -40
- 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 +22 -22
- package/lib-amd/publicApi/format/clearFormat.js.map +1 -1
- package/lib-amd/publicApi/format/getFormatState.d.ts +6 -6
- package/lib-amd/publicApi/format/getFormatState.js +21 -21
- 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 +26 -26
- 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 +34 -34
- 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 +36 -36
- 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 +17 -17
- 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 +18 -18
- 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 +29 -29
- 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 +32 -32
- 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 +116 -116
- 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 +31 -31
- 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 +26 -26
- 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 +32 -32
- package/lib-amd/publicApi/list/setListStyle.js.map +1 -1
- package/lib-amd/publicApi/list/toggleBullet.d.ts +8 -8
- package/lib-amd/publicApi/list/toggleBullet.js +20 -20
- package/lib-amd/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-amd/publicApi/list/toggleNumbering.d.ts +8 -8
- package/lib-amd/publicApi/list/toggleNumbering.js +20 -20
- 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 +23 -23
- 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 +49 -49
- 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 +60 -60
- 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 +34 -34
- 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 +19 -19
- 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 +26 -26
- package/lib-amd/publicApi/segment/setTextColor.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleBold.js +20 -20
- 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 +27 -27
- 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 +15 -15
- 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 +15 -15
- 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 +15 -15
- 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 +15 -15
- 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 +18 -18
- 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 +292 -292
- 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 +66 -66
- 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 +37 -37
- package/lib-amd/publicApi/table/formatTable.js.map +1 -1
- package/lib-amd/publicApi/table/insertTable.d.ts +11 -11
- package/lib-amd/publicApi/table/insertTable.js +45 -45
- 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/formatImageWithContentModel.d.ts +5 -5
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js +15 -15
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js +19 -19
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js +45 -45
- 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 +41 -41
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-mjs/index.d.ts +48 -48
- package/lib-mjs/index.js +48 -48
- 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 +58 -58
- 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 +64 -64
- 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 +134 -134
- package/lib-mjs/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js +46 -46
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-mjs/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib-mjs/modelApi/common/clearModelFormat.js +125 -125
- package/lib-mjs/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-mjs/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib-mjs/modelApi/common/wrapBlock.js +43 -43
- 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 +75 -75
- 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 +54 -54
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-mjs/modelApi/link/matchLink.d.ts +29 -29
- package/lib-mjs/modelApi/link/matchLink.js +90 -90
- package/lib-mjs/modelApi/link/matchLink.js.map +1 -1
- package/lib-mjs/modelApi/list/findListItemsInSameThread.d.ts +7 -7
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js +110 -110
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-mjs/modelApi/list/setListType.d.ts +7 -7
- package/lib-mjs/modelApi/list/setListType.js +109 -109
- package/lib-mjs/modelApi/list/setListType.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 +51 -51
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustWordSelection.d.ts +5 -5
- package/lib-mjs/modelApi/selection/adjustWordSelection.js +117 -117
- 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 +8 -8
- 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 +53 -53
- 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 +8 -8
- package/lib-mjs/modelApi/table/clearSelectedCells.js +22 -22
- 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 +7 -7
- 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 +24 -24
- 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 +28 -28
- 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 +22 -22
- 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 +33 -33
- 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 +34 -34
- 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 +53 -53
- 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 +21 -21
- 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 +38 -38
- 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 +19 -19
- package/lib-mjs/publicApi/format/clearFormat.js.map +1 -1
- package/lib-mjs/publicApi/format/getFormatState.d.ts +6 -6
- package/lib-mjs/publicApi/format/getFormatState.js +17 -17
- 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 +22 -22
- 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 +33 -33
- 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 +22 -22
- 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 +29 -29
- package/lib-mjs/publicApi/list/setListStyle.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleBullet.d.ts +8 -8
- package/lib-mjs/publicApi/list/toggleBullet.js +16 -16
- package/lib-mjs/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleNumbering.d.ts +8 -8
- package/lib-mjs/publicApi/list/toggleNumbering.js +16 -16
- 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 +58 -58
- 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 +32 -32
- 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/toggleBold.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleBold.js +17 -17
- 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 +11 -11
- 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 +15 -15
- 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 +290 -290
- 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 +74 -74
- 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 +11 -11
- package/lib-mjs/publicApi/table/insertTable.js +43 -43
- 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 +29 -29
- package/lib-mjs/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.d.ts +5 -5
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js +11 -11
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js +14 -14
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js +42 -42
- 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 +39 -39
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type { ContentModelEntity, DOMSelection, InsertEntityPosition, InsertEntityOptions, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Insert an entity into editor
|
|
4
|
-
* @param editor The Content Model editor
|
|
5
|
-
* @param type Type of entity
|
|
6
|
-
* @param isBlock True to insert a block entity, false to insert an inline entity
|
|
7
|
-
* @param position Position of the entity to insert. It can be
|
|
8
|
-
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
9
|
-
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
10
|
-
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
11
|
-
* @param options Move options to insert. See InsertEntityOptions
|
|
12
|
-
*/
|
|
13
|
-
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: boolean, position: 'focus' | 'begin' | 'end' | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|
|
14
|
-
/**
|
|
15
|
-
* Insert a block entity into editor
|
|
16
|
-
* @param editor The Content Model editor
|
|
17
|
-
* @param type Type of entity
|
|
18
|
-
* @param isBlock Must be true for a block entity
|
|
19
|
-
* @param position Position of the entity to insert. It can be
|
|
20
|
-
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
21
|
-
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
22
|
-
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
23
|
-
* @param options Move options to insert. See InsertEntityOptions
|
|
24
|
-
*/
|
|
25
|
-
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: true, position: InsertEntityPosition | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|
|
1
|
+
import type { ContentModelEntity, DOMSelection, InsertEntityPosition, InsertEntityOptions, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert an entity into editor
|
|
4
|
+
* @param editor The Content Model editor
|
|
5
|
+
* @param type Type of entity
|
|
6
|
+
* @param isBlock True to insert a block entity, false to insert an inline entity
|
|
7
|
+
* @param position Position of the entity to insert. It can be
|
|
8
|
+
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
9
|
+
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
10
|
+
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
11
|
+
* @param options Move options to insert. See InsertEntityOptions
|
|
12
|
+
*/
|
|
13
|
+
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: boolean, position: 'focus' | 'begin' | 'end' | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|
|
14
|
+
/**
|
|
15
|
+
* Insert a block entity into editor
|
|
16
|
+
* @param editor The Content Model editor
|
|
17
|
+
* @param type Type of entity
|
|
18
|
+
* @param isBlock Must be true for a block entity
|
|
19
|
+
* @param position Position of the entity to insert. It can be
|
|
20
|
+
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
21
|
+
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
22
|
+
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
23
|
+
* @param options Move options to insert. See InsertEntityOptions
|
|
24
|
+
*/
|
|
25
|
+
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: true, position: InsertEntityPosition | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
define(["require", "exports", "roosterjs-content-model-core", "roosterjs-content-model-dom", "../../modelApi/entity/insertEntityModel"], function (require, exports, roosterjs_content_model_core_1, roosterjs_content_model_dom_1, insertEntityModel_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
var BlockEntityTag = 'div';
|
|
5
|
-
var InlineEntityTag = 'span';
|
|
6
|
-
function insertEntity(editor, type, isBlock, position, options) {
|
|
7
|
-
var _a = options || {}, contentNode = _a.contentNode, focusAfterEntity = _a.focusAfterEntity, wrapperDisplay = _a.wrapperDisplay, skipUndoSnapshot = _a.skipUndoSnapshot;
|
|
8
|
-
var document = editor.getDocument();
|
|
9
|
-
var wrapper = document.createElement(isBlock ? BlockEntityTag : InlineEntityTag);
|
|
10
|
-
var display = wrapperDisplay !== null && wrapperDisplay !== void 0 ? wrapperDisplay : (isBlock ? undefined : 'inline-block');
|
|
11
|
-
wrapper.style.setProperty('display', display || null);
|
|
12
|
-
if (display == undefined && isBlock) {
|
|
13
|
-
wrapper.style.setProperty('width', '100%');
|
|
14
|
-
wrapper.style.setProperty('display', 'inline-block');
|
|
15
|
-
}
|
|
16
|
-
if (contentNode) {
|
|
17
|
-
wrapper.appendChild(contentNode);
|
|
18
|
-
}
|
|
19
|
-
var entityModel = (0, roosterjs_content_model_dom_1.createEntity)(wrapper, true /* isReadonly */, undefined /*format*/, type);
|
|
20
|
-
editor.formatContentModel(function (model, context) {
|
|
21
|
-
(0, insertEntityModel_1.insertEntityModel)(model, entityModel, typeof position == 'string' ? position : 'focus', isBlock, focusAfterEntity, context);
|
|
22
|
-
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
23
|
-
context.skipUndoSnapshot = skipUndoSnapshot;
|
|
24
|
-
context.newEntities.push(entityModel);
|
|
25
|
-
return true;
|
|
26
|
-
}, {
|
|
27
|
-
selectionOverride: typeof position === 'object' ? position : undefined,
|
|
28
|
-
changeSource: roosterjs_content_model_core_1.ChangeSource.InsertEntity,
|
|
29
|
-
getChangeData: function () { return ({
|
|
30
|
-
wrapper: wrapper,
|
|
31
|
-
type: type,
|
|
32
|
-
id: '',
|
|
33
|
-
isReadonly: true,
|
|
34
|
-
}); },
|
|
35
|
-
apiName: 'insertEntity',
|
|
36
|
-
});
|
|
37
|
-
return entityModel;
|
|
38
|
-
}
|
|
39
|
-
exports.default = insertEntity;
|
|
40
|
-
});
|
|
1
|
+
define(["require", "exports", "roosterjs-content-model-core", "roosterjs-content-model-dom", "../../modelApi/entity/insertEntityModel"], function (require, exports, roosterjs_content_model_core_1, roosterjs_content_model_dom_1, insertEntityModel_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var BlockEntityTag = 'div';
|
|
5
|
+
var InlineEntityTag = 'span';
|
|
6
|
+
function insertEntity(editor, type, isBlock, position, options) {
|
|
7
|
+
var _a = options || {}, contentNode = _a.contentNode, focusAfterEntity = _a.focusAfterEntity, wrapperDisplay = _a.wrapperDisplay, skipUndoSnapshot = _a.skipUndoSnapshot;
|
|
8
|
+
var document = editor.getDocument();
|
|
9
|
+
var wrapper = document.createElement(isBlock ? BlockEntityTag : InlineEntityTag);
|
|
10
|
+
var display = wrapperDisplay !== null && wrapperDisplay !== void 0 ? wrapperDisplay : (isBlock ? undefined : 'inline-block');
|
|
11
|
+
wrapper.style.setProperty('display', display || null);
|
|
12
|
+
if (display == undefined && isBlock) {
|
|
13
|
+
wrapper.style.setProperty('width', '100%');
|
|
14
|
+
wrapper.style.setProperty('display', 'inline-block');
|
|
15
|
+
}
|
|
16
|
+
if (contentNode) {
|
|
17
|
+
wrapper.appendChild(contentNode);
|
|
18
|
+
}
|
|
19
|
+
var entityModel = (0, roosterjs_content_model_dom_1.createEntity)(wrapper, true /* isReadonly */, undefined /*format*/, type);
|
|
20
|
+
editor.formatContentModel(function (model, context) {
|
|
21
|
+
(0, insertEntityModel_1.insertEntityModel)(model, entityModel, typeof position == 'string' ? position : 'focus', isBlock, focusAfterEntity, context);
|
|
22
|
+
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
23
|
+
context.skipUndoSnapshot = skipUndoSnapshot;
|
|
24
|
+
context.newEntities.push(entityModel);
|
|
25
|
+
return true;
|
|
26
|
+
}, {
|
|
27
|
+
selectionOverride: typeof position === 'object' ? position : undefined,
|
|
28
|
+
changeSource: roosterjs_content_model_core_1.ChangeSource.InsertEntity,
|
|
29
|
+
getChangeData: function () { return ({
|
|
30
|
+
wrapper: wrapper,
|
|
31
|
+
type: type,
|
|
32
|
+
id: '',
|
|
33
|
+
isReadonly: true,
|
|
34
|
+
}); },
|
|
35
|
+
apiName: 'insertEntity',
|
|
36
|
+
});
|
|
37
|
+
return entityModel;
|
|
38
|
+
}
|
|
39
|
+
exports.default = insertEntity;
|
|
40
|
+
});
|
|
41
41
|
//# sourceMappingURL=insertEntity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertEntity.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/entity/insertEntity.ts"],"names":[],"mappings":";;;IAWA,IAAM,cAAc,GAAG,KAAK,CAAC;IAC7B,IAAM,eAAe,GAAG,MAAM,CAAC;IAwC/B,SAAwB,YAAY,CAChC,MAAyB,EACzB,IAAY,EACZ,OAAgB,EAChB,QAA8C,EAC9C,OAA6B;QAEvB,IAAA,KAAsE,OAAO,IAAI,EAAE,EAAjF,WAAW,iBAAA,EAAE,gBAAgB,sBAAA,EAAE,cAAc,oBAAA,EAAE,gBAAgB,sBAAkB,CAAC;QAC1F,IAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACtC,IAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACnF,IAAM,OAAO,GAAG,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAEzE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;QAEtD,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SACxD;QAED,IAAI,WAAW,EAAE;YACb,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;SACpC;QAED,IAAM,WAAW,GAAG,IAAA,0CAAY,EAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE7F,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,IAAA,qCAAiB,EACb,KAAK,EACL,WAAW,EACX,OAAO,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAChD,OAAO,EACP,gBAAgB,EAChB,OAAO,CACV,CAAC;YAEF,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YAC5C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAEtC,OAAO,IAAI,CAAC;QAChB,CAAC,EACD;YACI,iBAAiB,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACtE,YAAY,EAAE,2CAAY,CAAC,YAAY;YACvC,aAAa,EAAE,cAAM,OAAA,CAAC;gBAClB,OAAO,SAAA;gBACP,IAAI,MAAA;gBACJ,EAAE,EAAE,EAAE;gBACN,UAAU,EAAE,IAAI;aACnB,CAAC,EALmB,CAKnB;YACF,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;QAEF,OAAO,WAAW,CAAC;IACvB,CAAC;IAzDD,+BAyDC","sourcesContent":["import { ChangeSource } from 'roosterjs-content-model-core';\
|
|
1
|
+
{"version":3,"file":"insertEntity.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/entity/insertEntity.ts"],"names":[],"mappings":";;;IAWA,IAAM,cAAc,GAAG,KAAK,CAAC;IAC7B,IAAM,eAAe,GAAG,MAAM,CAAC;IAwC/B,SAAwB,YAAY,CAChC,MAAyB,EACzB,IAAY,EACZ,OAAgB,EAChB,QAA8C,EAC9C,OAA6B;QAEvB,IAAA,KAAsE,OAAO,IAAI,EAAE,EAAjF,WAAW,iBAAA,EAAE,gBAAgB,sBAAA,EAAE,cAAc,oBAAA,EAAE,gBAAgB,sBAAkB,CAAC;QAC1F,IAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACtC,IAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACnF,IAAM,OAAO,GAAG,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAEzE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;QAEtD,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SACxD;QAED,IAAI,WAAW,EAAE;YACb,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;SACpC;QAED,IAAM,WAAW,GAAG,IAAA,0CAAY,EAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE7F,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,IAAA,qCAAiB,EACb,KAAK,EACL,WAAW,EACX,OAAO,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAChD,OAAO,EACP,gBAAgB,EAChB,OAAO,CACV,CAAC;YAEF,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YAC5C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAEtC,OAAO,IAAI,CAAC;QAChB,CAAC,EACD;YACI,iBAAiB,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACtE,YAAY,EAAE,2CAAY,CAAC,YAAY;YACvC,aAAa,EAAE,cAAM,OAAA,CAAC;gBAClB,OAAO,SAAA;gBACP,IAAI,MAAA;gBACJ,EAAE,EAAE,EAAE;gBACN,UAAU,EAAE,IAAI;aACnB,CAAC,EALmB,CAKnB;YACF,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;QAEF,OAAO,WAAW,CAAC;IACvB,CAAC;IAzDD,+BAyDC","sourcesContent":["import { ChangeSource } from 'roosterjs-content-model-core';\nimport { createEntity, normalizeContentModel } from 'roosterjs-content-model-dom';\nimport { insertEntityModel } from '../../modelApi/entity/insertEntityModel';\nimport type {\n ContentModelEntity,\n DOMSelection,\n InsertEntityPosition,\n InsertEntityOptions,\n IStandaloneEditor,\n} from 'roosterjs-content-model-types';\n\nconst BlockEntityTag = 'div';\nconst InlineEntityTag = 'span';\n\n/**\n * Insert an entity into editor\n * @param editor The Content Model editor\n * @param type Type of entity\n * @param isBlock True to insert a block entity, false to insert an inline entity\n * @param position Position of the entity to insert. It can be\n * Value of InsertEntityPosition: see InsertEntityPosition\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\n * @param options Move options to insert. See InsertEntityOptions\n */\nexport default function insertEntity(\n editor: IStandaloneEditor,\n type: string,\n isBlock: boolean,\n position: 'focus' | 'begin' | 'end' | DOMSelection,\n options?: InsertEntityOptions\n): ContentModelEntity | null;\n\n/**\n * Insert a block entity into editor\n * @param editor The Content Model editor\n * @param type Type of entity\n * @param isBlock Must be true for a block entity\n * @param position Position of the entity to insert. It can be\n * Value of InsertEntityPosition: see InsertEntityPosition\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\n * @param options Move options to insert. See InsertEntityOptions\n */\nexport default function insertEntity(\n editor: IStandaloneEditor,\n type: string,\n isBlock: true,\n position: InsertEntityPosition | DOMSelection,\n options?: InsertEntityOptions\n): ContentModelEntity | null;\n\nexport default function insertEntity(\n editor: IStandaloneEditor,\n type: string,\n isBlock: boolean,\n position?: InsertEntityPosition | DOMSelection,\n options?: InsertEntityOptions\n): ContentModelEntity | null {\n const { contentNode, focusAfterEntity, wrapperDisplay, skipUndoSnapshot } = options || {};\n const document = editor.getDocument();\n const wrapper = document.createElement(isBlock ? BlockEntityTag : InlineEntityTag);\n const display = wrapperDisplay ?? (isBlock ? undefined : 'inline-block');\n\n wrapper.style.setProperty('display', display || null);\n\n if (display == undefined && isBlock) {\n wrapper.style.setProperty('width', '100%');\n wrapper.style.setProperty('display', 'inline-block');\n }\n\n if (contentNode) {\n wrapper.appendChild(contentNode);\n }\n\n const entityModel = createEntity(wrapper, true /* isReadonly */, undefined /*format*/, type);\n\n editor.formatContentModel(\n (model, context) => {\n insertEntityModel(\n model,\n entityModel,\n typeof position == 'string' ? position : 'focus',\n isBlock,\n focusAfterEntity,\n context\n );\n\n normalizeContentModel(model);\n\n context.skipUndoSnapshot = skipUndoSnapshot;\n context.newEntities.push(entityModel);\n\n return true;\n },\n {\n selectionOverride: typeof position === 'object' ? position : undefined,\n changeSource: ChangeSource.InsertEntity,\n getChangeData: () => ({\n wrapper,\n type,\n id: '',\n isReadonly: true,\n }),\n apiName: 'insertEntity',\n }\n );\n\n return entityModel;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Clear format of selection
|
|
4
|
-
* @param editor The editor to clear format from
|
|
5
|
-
*/
|
|
6
|
-
export default function clearFormat(editor: IStandaloneEditor): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Clear format of selection
|
|
4
|
+
* @param editor The editor to clear format from
|
|
5
|
+
*/
|
|
6
|
+
export default function clearFormat(editor: IStandaloneEditor): void;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
define(["require", "exports", "../../modelApi/common/clearModelFormat", "roosterjs-content-model-dom"], function (require, exports, clearModelFormat_1, roosterjs_content_model_dom_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Clear format of selection
|
|
6
|
-
* @param editor The editor to clear format from
|
|
7
|
-
*/
|
|
8
|
-
function clearFormat(editor) {
|
|
9
|
-
editor.focus();
|
|
10
|
-
editor.formatContentModel(function (model) {
|
|
11
|
-
var blocksToClear = [];
|
|
12
|
-
var segmentsToClear = [];
|
|
13
|
-
var tablesToClear = [];
|
|
14
|
-
(0, clearModelFormat_1.clearModelFormat)(model, blocksToClear, segmentsToClear, tablesToClear);
|
|
15
|
-
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
16
|
-
return (blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0);
|
|
17
|
-
}, {
|
|
18
|
-
apiName: 'clearFormat',
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
exports.default = clearFormat;
|
|
22
|
-
});
|
|
1
|
+
define(["require", "exports", "../../modelApi/common/clearModelFormat", "roosterjs-content-model-dom"], function (require, exports, clearModelFormat_1, roosterjs_content_model_dom_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Clear format of selection
|
|
6
|
+
* @param editor The editor to clear format from
|
|
7
|
+
*/
|
|
8
|
+
function clearFormat(editor) {
|
|
9
|
+
editor.focus();
|
|
10
|
+
editor.formatContentModel(function (model) {
|
|
11
|
+
var blocksToClear = [];
|
|
12
|
+
var segmentsToClear = [];
|
|
13
|
+
var tablesToClear = [];
|
|
14
|
+
(0, clearModelFormat_1.clearModelFormat)(model, blocksToClear, segmentsToClear, tablesToClear);
|
|
15
|
+
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
16
|
+
return (blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0);
|
|
17
|
+
}, {
|
|
18
|
+
apiName: 'clearFormat',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.default = clearFormat;
|
|
22
|
+
});
|
|
23
23
|
//# sourceMappingURL=clearFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clearFormat.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/clearFormat.ts"],"names":[],"mappings":";;;IAUA;;;OAGG;IACH,SAAwB,WAAW,CAAC,MAAyB;QACzD,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,aAAa,GAAoD,EAAE,CAAC;YAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;YAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;YAEzD,IAAA,mCAAgB,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEvE,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CACH,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CACrF,CAAC;QACN,CAAC,EACD;YACI,OAAO,EAAE,aAAa;SACzB,CACJ,CAAC;IACN,CAAC;IArBD,8BAqBC","sourcesContent":["import { clearModelFormat } from '../../modelApi/common/clearModelFormat';\
|
|
1
|
+
{"version":3,"file":"clearFormat.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/clearFormat.ts"],"names":[],"mappings":";;;IAUA;;;OAGG;IACH,SAAwB,WAAW,CAAC,MAAyB;QACzD,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,aAAa,GAAoD,EAAE,CAAC;YAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;YAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;YAEzD,IAAA,mCAAgB,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEvE,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CACH,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CACrF,CAAC;QACN,CAAC,EACD;YACI,OAAO,EAAE,aAAa;SACzB,CACJ,CAAC;IACN,CAAC;IArBD,8BAqBC","sourcesContent":["import { clearModelFormat } from '../../modelApi/common/clearModelFormat';\nimport { normalizeContentModel } from 'roosterjs-content-model-dom';\nimport type {\n IStandaloneEditor,\n ContentModelBlock,\n ContentModelBlockGroup,\n ContentModelSegment,\n ContentModelTable,\n} from 'roosterjs-content-model-types';\n\n/**\n * Clear format of selection\n * @param editor The editor to clear format from\n */\nexport default function clearFormat(editor: IStandaloneEditor) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n const blocksToClear: [ContentModelBlockGroup[], ContentModelBlock][] = [];\n const segmentsToClear: ContentModelSegment[] = [];\n const tablesToClear: [ContentModelTable, boolean][] = [];\n\n clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);\n\n normalizeContentModel(model);\n\n return (\n blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0\n );\n },\n {\n apiName: 'clearFormat',\n }\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IStandaloneEditor, ContentModelFormatState } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Get current format state
|
|
4
|
-
* @param editor The editor to get format from
|
|
5
|
-
*/
|
|
6
|
-
export default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState;
|
|
1
|
+
import type { IStandaloneEditor, ContentModelFormatState } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Get current format state
|
|
4
|
+
* @param editor The editor to get format from
|
|
5
|
+
*/
|
|
6
|
+
export default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
define(["require", "exports", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_core_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Get current format state
|
|
6
|
-
* @param editor The editor to get format from
|
|
7
|
-
*/
|
|
8
|
-
function getFormatState(editor) {
|
|
9
|
-
var pendingFormat = editor.getPendingFormat();
|
|
10
|
-
var model = editor.getContentModelCopy('reduced');
|
|
11
|
-
var manager = editor.getSnapshotsManager();
|
|
12
|
-
var result = {
|
|
13
|
-
canUndo: manager.hasNewContent || manager.canMove(-1),
|
|
14
|
-
canRedo: manager.canMove(1),
|
|
15
|
-
isDarkMode: editor.isDarkMode(),
|
|
16
|
-
};
|
|
17
|
-
(0, roosterjs_content_model_core_1.retrieveModelFormatState)(model, pendingFormat, result);
|
|
18
|
-
return result;
|
|
19
|
-
}
|
|
20
|
-
exports.default = getFormatState;
|
|
21
|
-
});
|
|
1
|
+
define(["require", "exports", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_core_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Get current format state
|
|
6
|
+
* @param editor The editor to get format from
|
|
7
|
+
*/
|
|
8
|
+
function getFormatState(editor) {
|
|
9
|
+
var pendingFormat = editor.getPendingFormat();
|
|
10
|
+
var model = editor.getContentModelCopy('reduced');
|
|
11
|
+
var manager = editor.getSnapshotsManager();
|
|
12
|
+
var result = {
|
|
13
|
+
canUndo: manager.hasNewContent || manager.canMove(-1),
|
|
14
|
+
canRedo: manager.canMove(1),
|
|
15
|
+
isDarkMode: editor.isDarkMode(),
|
|
16
|
+
};
|
|
17
|
+
(0, roosterjs_content_model_core_1.retrieveModelFormatState)(model, pendingFormat, result);
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
exports.default = getFormatState;
|
|
21
|
+
});
|
|
22
22
|
//# sourceMappingURL=getFormatState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormatState.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/getFormatState.ts"],"names":[],"mappings":";;;IAGA;;;OAGG;IACH,SAAwB,cAAc,CAAC,MAAyB;QAC5D,IAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAChD,IAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACpD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAC7C,IAAM,MAAM,GAA4B;YACpC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;SAClC,CAAC;QAEF,IAAA,uDAAwB,EAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QAEvD,OAAO,MAAM,CAAC;IAClB,CAAC;IAbD,iCAaC","sourcesContent":["import { retrieveModelFormatState } from 'roosterjs-content-model-core';\
|
|
1
|
+
{"version":3,"file":"getFormatState.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/getFormatState.ts"],"names":[],"mappings":";;;IAGA;;;OAGG;IACH,SAAwB,cAAc,CAAC,MAAyB;QAC5D,IAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAChD,IAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACpD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAC7C,IAAM,MAAM,GAA4B;YACpC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;SAClC,CAAC;QAEF,IAAA,uDAAwB,EAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QAEvD,OAAO,MAAM,CAAC;IAClB,CAAC;IAbD,iCAaC","sourcesContent":["import { retrieveModelFormatState } from 'roosterjs-content-model-core';\nimport type { IStandaloneEditor, ContentModelFormatState } from 'roosterjs-content-model-types';\n\n/**\n * Get current format state\n * @param editor The editor to get format from\n */\nexport default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState {\n const pendingFormat = editor.getPendingFormat();\n const model = editor.getContentModelCopy('reduced');\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 retrieveModelFormatState(model, pendingFormat, result);\n\n return result;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContentModelImage, IStandaloneEditor } 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 default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null;
|
|
1
|
+
import type { ContentModelImage, IStandaloneEditor } 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 default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
define(["require", "exports", "../../modelApi/selection/adjustSegmentSelection"], function (require, exports, adjustSegmentSelection_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Adjust selection to make sure select an image if any
|
|
6
|
-
* @return Content Model Image object if an image is select, or null
|
|
7
|
-
*/
|
|
8
|
-
function adjustImageSelection(editor) {
|
|
9
|
-
var image = null;
|
|
10
|
-
editor.formatContentModel(function (model) {
|
|
11
|
-
return (0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target) {
|
|
12
|
-
if (target.isSelected && target.segmentType == 'Image') {
|
|
13
|
-
image = target;
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
}, function (target, ref) { return target == ref; });
|
|
20
|
-
}, {
|
|
21
|
-
apiName: 'adjustImageSelection',
|
|
22
|
-
});
|
|
23
|
-
return image;
|
|
24
|
-
}
|
|
25
|
-
exports.default = adjustImageSelection;
|
|
26
|
-
});
|
|
1
|
+
define(["require", "exports", "../../modelApi/selection/adjustSegmentSelection"], function (require, exports, adjustSegmentSelection_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Adjust selection to make sure select an image if any
|
|
6
|
+
* @return Content Model Image object if an image is select, or null
|
|
7
|
+
*/
|
|
8
|
+
function adjustImageSelection(editor) {
|
|
9
|
+
var image = null;
|
|
10
|
+
editor.formatContentModel(function (model) {
|
|
11
|
+
return (0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target) {
|
|
12
|
+
if (target.isSelected && target.segmentType == 'Image') {
|
|
13
|
+
image = target;
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}, function (target, ref) { return target == ref; });
|
|
20
|
+
}, {
|
|
21
|
+
apiName: 'adjustImageSelection',
|
|
22
|
+
});
|
|
23
|
+
return image;
|
|
24
|
+
}
|
|
25
|
+
exports.default = adjustImageSelection;
|
|
26
|
+
});
|
|
27
27
|
//# sourceMappingURL=adjustImageSelection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adjustImageSelection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/adjustImageSelection.ts"],"names":[],"mappings":";;;IAGA;;;OAGG;IACH,SAAwB,oBAAoB,CAAC,MAAyB;QAClE,IAAI,KAAK,GAA6B,IAAI,CAAC;QAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,OAAA,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAA,MAAM;gBACF,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;oBACpD,KAAK,GAAG,MAAM,CAAC;oBACf,OAAO,IAAI,CAAC;iBACf;qBAAM;oBACH,OAAO,KAAK,CAAC;iBAChB;YACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;QAXD,CAWC,EACL;YACI,OAAO,EAAE,sBAAsB;SAClC,CACJ,CAAC;QAEF,OAAO,KAAK,CAAC;IACjB,CAAC;IAvBD,uCAuBC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\
|
|
1
|
+
{"version":3,"file":"adjustImageSelection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/adjustImageSelection.ts"],"names":[],"mappings":";;;IAGA;;;OAGG;IACH,SAAwB,oBAAoB,CAAC,MAAyB;QAClE,IAAI,KAAK,GAA6B,IAAI,CAAC;QAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,OAAA,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAA,MAAM;gBACF,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;oBACpD,KAAK,GAAG,MAAM,CAAC;oBACf,OAAO,IAAI,CAAC;iBACf;qBAAM;oBACH,OAAO,KAAK,CAAC;iBAChB;YACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;QAXD,CAWC,EACL;YACI,OAAO,EAAE,sBAAsB;SAClC,CACJ,CAAC;QAEF,OAAO,KAAK,CAAC;IACjB,CAAC;IAvBD,uCAuBC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\nimport type { ContentModelImage, IStandaloneEditor } 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 default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null {\n let image: ContentModelImage | null = null;\n\n editor.formatContentModel(\n model =>\n adjustSegmentSelection(\n model,\n target => {\n if (target.isSelected && target.segmentType == 'Image') {\n image = target;\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,7 +1,7 @@
|
|
|
1
|
-
import type { IStandaloneEditor } 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 default function changeImage(editor: IStandaloneEditor, file: File): void;
|
|
1
|
+
import type { IStandaloneEditor } 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 default function changeImage(editor: IStandaloneEditor, file: File): void;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
define(["require", "exports", "../utils/formatImageWithContentModel", "roosterjs-content-model-core"], function (require, exports, formatImageWithContentModel_1, roosterjs_content_model_core_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Change the selected image src
|
|
6
|
-
* @param editor The editor instance
|
|
7
|
-
* @param file The image file
|
|
8
|
-
*/
|
|
9
|
-
function changeImage(editor, file) {
|
|
10
|
-
editor.focus();
|
|
11
|
-
var selection = editor.getDOMSelection();
|
|
12
|
-
(0, roosterjs_content_model_core_1.readFile)(file, function (dataUrl) {
|
|
13
|
-
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
|
|
14
|
-
(0, formatImageWithContentModel_1.default)(editor, 'changeImage', function (image) {
|
|
15
|
-
var _a, _b;
|
|
16
|
-
var originalSrc = (_b = (_a = (0, roosterjs_content_model_core_1.updateImageMetadata)(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
|
|
17
|
-
var previousSrc = image.src;
|
|
18
|
-
image.src = dataUrl;
|
|
19
|
-
image.dataset = {};
|
|
20
|
-
image.format.width = '';
|
|
21
|
-
image.format.height = '';
|
|
22
|
-
image.alt = '';
|
|
23
|
-
editor.triggerEvent('editImage', {
|
|
24
|
-
image: selection.image,
|
|
25
|
-
previousSrc: previousSrc,
|
|
26
|
-
newSrc: dataUrl,
|
|
27
|
-
originalSrc: originalSrc,
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
exports.default = changeImage;
|
|
34
|
-
});
|
|
1
|
+
define(["require", "exports", "../utils/formatImageWithContentModel", "roosterjs-content-model-core"], function (require, exports, formatImageWithContentModel_1, roosterjs_content_model_core_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Change the selected image src
|
|
6
|
+
* @param editor The editor instance
|
|
7
|
+
* @param file The image file
|
|
8
|
+
*/
|
|
9
|
+
function changeImage(editor, file) {
|
|
10
|
+
editor.focus();
|
|
11
|
+
var selection = editor.getDOMSelection();
|
|
12
|
+
(0, roosterjs_content_model_core_1.readFile)(file, function (dataUrl) {
|
|
13
|
+
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
|
|
14
|
+
(0, formatImageWithContentModel_1.default)(editor, 'changeImage', function (image) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
var originalSrc = (_b = (_a = (0, roosterjs_content_model_core_1.updateImageMetadata)(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
|
|
17
|
+
var previousSrc = image.src;
|
|
18
|
+
image.src = dataUrl;
|
|
19
|
+
image.dataset = {};
|
|
20
|
+
image.format.width = '';
|
|
21
|
+
image.format.height = '';
|
|
22
|
+
image.alt = '';
|
|
23
|
+
editor.triggerEvent('editImage', {
|
|
24
|
+
image: selection.image,
|
|
25
|
+
previousSrc: previousSrc,
|
|
26
|
+
newSrc: dataUrl,
|
|
27
|
+
originalSrc: originalSrc,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
exports.default = changeImage;
|
|
34
|
+
});
|
|
35
35
|
//# sourceMappingURL=changeImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changeImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/changeImage.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,WAAW,CAAC,MAAyB,EAAE,IAAU;QACrE,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3C,IAAA,uCAAQ,EAAC,IAAI,EAAE,UAAA,OAAO;YAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;gBAChE,IAAA,qCAA2B,EAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;oBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,IAAA,kDAAmB,EAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;oBAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;oBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;oBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;oBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;oBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;oBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;oBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;wBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;wBACtB,WAAW,aAAA;wBACX,MAAM,EAAE,OAAO;wBACf,WAAW,aAAA;qBACd,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;aACN;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAzBD,8BAyBC","sourcesContent":["import formatImageWithContentModel from '../utils/formatImageWithContentModel';\
|
|
1
|
+
{"version":3,"file":"changeImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/changeImage.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,WAAW,CAAC,MAAyB,EAAE,IAAU;QACrE,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3C,IAAA,uCAAQ,EAAC,IAAI,EAAE,UAAA,OAAO;YAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;gBAChE,IAAA,qCAA2B,EAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;oBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,IAAA,kDAAmB,EAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;oBAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;oBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;oBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;oBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;oBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;oBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;oBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;wBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;wBACtB,WAAW,aAAA;wBACX,MAAM,EAAE,OAAO;wBACf,WAAW,aAAA;qBACd,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;aACN;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAzBD,8BAyBC","sourcesContent":["import formatImageWithContentModel from '../utils/formatImageWithContentModel';\nimport { readFile, updateImageMetadata } from 'roosterjs-content-model-core';\nimport type { ContentModelImage, IStandaloneEditor } 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 default function changeImage(editor: IStandaloneEditor, 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 = updateImageMetadata(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,7 +1,7 @@
|
|
|
1
|
-
import type { IStandaloneEditor } 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 default function insertImage(editor: IStandaloneEditor, imageFileOrSrc: File | string): void;
|
|
1
|
+
import type { IStandaloneEditor } 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 default function insertImage(editor: IStandaloneEditor, imageFileOrSrc: File | string): void;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
define(["require", "exports", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Insert an image into current selected position
|
|
6
|
-
* @param editor The editor to operate on
|
|
7
|
-
* @param file Image Blob file or source string
|
|
8
|
-
*/
|
|
9
|
-
function insertImage(editor, imageFileOrSrc) {
|
|
10
|
-
editor.focus();
|
|
11
|
-
if (typeof imageFileOrSrc == 'string') {
|
|
12
|
-
insertImageWithSrc(editor, imageFileOrSrc);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
(0, roosterjs_content_model_core_1.readFile)(imageFileOrSrc, function (dataUrl) {
|
|
16
|
-
if (dataUrl && !editor.isDisposed()) {
|
|
17
|
-
insertImageWithSrc(editor, dataUrl);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.default = insertImage;
|
|
23
|
-
function insertImageWithSrc(editor, src) {
|
|
24
|
-
editor.formatContentModel(function (model, context) {
|
|
25
|
-
var image = (0, roosterjs_content_model_dom_1.createImage)(src, { backgroundColor: '' });
|
|
26
|
-
var doc = (0, roosterjs_content_model_dom_1.createContentModelDocument)();
|
|
27
|
-
(0, roosterjs_content_model_dom_1.addSegment)(doc, image);
|
|
28
|
-
(0, roosterjs_content_model_core_1.mergeModel)(model, doc, context, {
|
|
29
|
-
mergeFormat: 'mergeAll',
|
|
30
|
-
});
|
|
31
|
-
return true;
|
|
32
|
-
}, {
|
|
33
|
-
apiName: 'insertImage',
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
1
|
+
define(["require", "exports", "roosterjs-content-model-dom", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_dom_1, roosterjs_content_model_core_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Insert an image into current selected position
|
|
6
|
+
* @param editor The editor to operate on
|
|
7
|
+
* @param file Image Blob file or source string
|
|
8
|
+
*/
|
|
9
|
+
function insertImage(editor, imageFileOrSrc) {
|
|
10
|
+
editor.focus();
|
|
11
|
+
if (typeof imageFileOrSrc == 'string') {
|
|
12
|
+
insertImageWithSrc(editor, imageFileOrSrc);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
(0, roosterjs_content_model_core_1.readFile)(imageFileOrSrc, function (dataUrl) {
|
|
16
|
+
if (dataUrl && !editor.isDisposed()) {
|
|
17
|
+
insertImageWithSrc(editor, dataUrl);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = insertImage;
|
|
23
|
+
function insertImageWithSrc(editor, src) {
|
|
24
|
+
editor.formatContentModel(function (model, context) {
|
|
25
|
+
var image = (0, roosterjs_content_model_dom_1.createImage)(src, { backgroundColor: '' });
|
|
26
|
+
var doc = (0, roosterjs_content_model_dom_1.createContentModelDocument)();
|
|
27
|
+
(0, roosterjs_content_model_dom_1.addSegment)(doc, image);
|
|
28
|
+
(0, roosterjs_content_model_core_1.mergeModel)(model, doc, context, {
|
|
29
|
+
mergeFormat: 'mergeAll',
|
|
30
|
+
});
|
|
31
|
+
return true;
|
|
32
|
+
}, {
|
|
33
|
+
apiName: 'insertImage',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
37
|
//# sourceMappingURL=insertImage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/insertImage.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,WAAW,CAAC,MAAyB,EAAE,cAA6B;QACxF,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAI,OAAO,cAAc,IAAI,QAAQ,EAAE;YACnC,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;SAC9C;aAAM;YACH,IAAA,uCAAQ,EAAC,cAAc,EAAE,UAAA,OAAO;gBAC5B,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;oBACjC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;iBACvC;YACL,CAAC,CAAC,CAAC;SACN;IACL,CAAC;IAZD,8BAYC;IAED,SAAS,kBAAkB,CAAC,MAAyB,EAAE,GAAW;QAC9D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,IAAM,KAAK,GAAG,IAAA,yCAAW,EAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;YACxD,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;YAEzC,IAAA,wCAAU,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACvB,IAAA,yCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;gBAC5B,WAAW,EAAE,UAAU;aAC1B,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QAChB,CAAC,EACD;YACI,OAAO,EAAE,aAAa;SACzB,CACJ,CAAC;IACN,CAAC","sourcesContent":["import { addSegment, createContentModelDocument, createImage } from 'roosterjs-content-model-dom';\
|
|
1
|
+
{"version":3,"file":"insertImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/insertImage.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,WAAW,CAAC,MAAyB,EAAE,cAA6B;QACxF,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAI,OAAO,cAAc,IAAI,QAAQ,EAAE;YACnC,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;SAC9C;aAAM;YACH,IAAA,uCAAQ,EAAC,cAAc,EAAE,UAAA,OAAO;gBAC5B,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;oBACjC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;iBACvC;YACL,CAAC,CAAC,CAAC;SACN;IACL,CAAC;IAZD,8BAYC;IAED,SAAS,kBAAkB,CAAC,MAAyB,EAAE,GAAW;QAC9D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,IAAM,KAAK,GAAG,IAAA,yCAAW,EAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;YACxD,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;YAEzC,IAAA,wCAAU,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACvB,IAAA,yCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;gBAC5B,WAAW,EAAE,UAAU;aAC1B,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QAChB,CAAC,EACD;YACI,OAAO,EAAE,aAAa;SACzB,CACJ,CAAC;IACN,CAAC","sourcesContent":["import { addSegment, createContentModelDocument, createImage } from 'roosterjs-content-model-dom';\nimport { mergeModel, readFile } from 'roosterjs-content-model-core';\nimport type { IStandaloneEditor } 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 default function insertImage(editor: IStandaloneEditor, 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: IStandaloneEditor, 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\n return true;\n },\n {\n apiName: 'insertImage',\n }\n );\n}\n"]}
|