roosterjs-content-model-api 0.25.0 → 0.26.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 +48 -43
- package/lib/index.js +99 -89
- 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 -5
- package/lib/modelApi/block/setModelIndentation.js +138 -47
- 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 -75
- 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 -5
- package/lib/modelApi/list/findListItemsInSameThread.js +114 -112
- 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 -0
- package/lib/modelApi/table/clearSelectedCells.js +27 -0
- package/lib/modelApi/table/clearSelectedCells.js.map +1 -0
- package/lib/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib/modelApi/table/createTableStructure.js +19 -19
- package/lib/modelApi/table/createTableStructure.js.map +1 -1
- package/lib/modelApi/table/deleteTable.d.ts +5 -5
- package/lib/modelApi/table/deleteTable.js +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 -5
- package/lib/modelApi/table/insertTableColumn.js +28 -22
- package/lib/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib/modelApi/table/insertTableRow.d.ts +7 -5
- package/lib/modelApi/table/insertTableRow.js +32 -26
- 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 -36
- 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 -102
- 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 -0
- package/lib/publicApi/utils/formatTableWithContentModel.js +44 -0
- package/lib/publicApi/utils/formatTableWithContentModel.js.map +1 -0
- package/lib-amd/index.d.ts +48 -43
- package/lib-amd/index.js +53 -48
- 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 -5
- package/lib-amd/modelApi/block/setModelIndentation.js +137 -47
- 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 -74
- 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 -5
- package/lib-amd/modelApi/list/findListItemsInSameThread.js +116 -114
- 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 -0
- package/lib-amd/modelApi/table/clearSelectedCells.js +28 -0
- package/lib-amd/modelApi/table/clearSelectedCells.js.map +1 -0
- package/lib-amd/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib-amd/modelApi/table/createTableStructure.js +20 -20
- package/lib-amd/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTable.d.ts +5 -5
- package/lib-amd/modelApi/table/deleteTable.js +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 -5
- package/lib-amd/modelApi/table/insertTableColumn.js +27 -22
- package/lib-amd/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/insertTableRow.d.ts +7 -5
- package/lib-amd/modelApi/table/insertTableRow.js +30 -25
- 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 -35
- 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 -88
- 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 -0
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js +42 -0
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js.map +1 -0
- package/lib-mjs/index.d.ts +48 -43
- package/lib-mjs/index.js +48 -43
- 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 -5
- package/lib-mjs/modelApi/block/setModelIndentation.js +134 -43
- 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 -71
- 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 -5
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js +110 -108
- 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 -0
- package/lib-mjs/modelApi/table/clearSelectedCells.js +23 -0
- package/lib-mjs/modelApi/table/clearSelectedCells.js.map +1 -0
- package/lib-mjs/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib-mjs/modelApi/table/createTableStructure.js +15 -15
- package/lib-mjs/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTable.d.ts +5 -5
- package/lib-mjs/modelApi/table/deleteTable.js +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 -5
- package/lib-mjs/modelApi/table/insertTableColumn.js +24 -18
- package/lib-mjs/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/insertTableRow.d.ts +7 -5
- package/lib-mjs/modelApi/table/insertTableRow.js +28 -22
- 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 -33
- 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 -99
- 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 -0
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js +40 -0
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js.map +1 -0
- package/package.json +4 -4
- package/lib/modelApi/common/retrieveModelFormatState.d.ts +0 -5
- package/lib/modelApi/common/retrieveModelFormatState.js +0 -171
- package/lib/modelApi/common/retrieveModelFormatState.js.map +0 -1
- package/lib-amd/modelApi/common/retrieveModelFormatState.d.ts +0 -5
- package/lib-amd/modelApi/common/retrieveModelFormatState.js +0 -171
- package/lib-amd/modelApi/common/retrieveModelFormatState.js.map +0 -1
- package/lib-mjs/modelApi/common/retrieveModelFormatState.d.ts +0 -5
- package/lib-mjs/modelApi/common/retrieveModelFormatState.js +0 -167
- package/lib-mjs/modelApi/common/retrieveModelFormatState.js.map +0 -1
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
import { ChangeSource } from 'roosterjs-content-model-core';
|
|
2
|
-
import { createEntity, normalizeContentModel } from 'roosterjs-content-model-dom';
|
|
3
|
-
import { insertEntityModel } from '../../modelApi/entity/insertEntityModel';
|
|
4
|
-
var BlockEntityTag = 'div';
|
|
5
|
-
var InlineEntityTag = 'span';
|
|
6
|
-
export default 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
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import { ChangeSource } from 'roosterjs-content-model-core';
|
|
2
|
+
import { createEntity, normalizeContentModel } from 'roosterjs-content-model-dom';
|
|
3
|
+
import { insertEntityModel } from '../../modelApi/entity/insertEntityModel';
|
|
4
|
+
var BlockEntityTag = 'div';
|
|
5
|
+
var InlineEntityTag = 'span';
|
|
6
|
+
export default 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 = createEntity(wrapper, true /* isReadonly */, undefined /*format*/, type);
|
|
20
|
+
editor.formatContentModel(function (model, context) {
|
|
21
|
+
insertEntityModel(model, entityModel, typeof position == 'string' ? position : 'focus', isBlock, focusAfterEntity, context);
|
|
22
|
+
normalizeContentModel(model);
|
|
23
|
+
context.skipUndoSnapshot = skipUndoSnapshot;
|
|
24
|
+
context.newEntities.push(entityModel);
|
|
25
|
+
return true;
|
|
26
|
+
}, {
|
|
27
|
+
selectionOverride: typeof position === 'object' ? position : undefined,
|
|
28
|
+
changeSource: 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
|
+
}
|
|
34
39
|
//# 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":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAS5E,IAAM,cAAc,GAAG,KAAK,CAAC;AAC7B,IAAM,eAAe,GAAG,MAAM,CAAC;AAwC/B,MAAM,CAAC,OAAO,UAAU,YAAY,CAChC,MAAyB,EACzB,IAAY,EACZ,OAAgB,EAChB,QAA8C,EAC9C,OAA6B;IAEvB,IAAA,KAAsE,OAAO,IAAI,EAAE,EAAjF,WAAW,iBAAA,EAAE,gBAAgB,sBAAA,EAAE,cAAc,oBAAA,EAAE,gBAAgB,sBAAkB,CAAC;IAC1F,IAAM,
|
|
1
|
+
{"version":3,"file":"insertEntity.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/entity/insertEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAS5E,IAAM,cAAc,GAAG,KAAK,CAAC;AAC7B,IAAM,eAAe,GAAG,MAAM,CAAC;AAwC/B,MAAM,CAAC,OAAO,UAAU,YAAY,CAChC,MAAyB,EACzB,IAAY,EACZ,OAAgB,EAChB,QAA8C,EAC9C,OAA6B;IAEvB,IAAA,KAAsE,OAAO,IAAI,EAAE,EAAjF,WAAW,iBAAA,EAAE,gBAAgB,sBAAA,EAAE,cAAc,oBAAA,EAAE,gBAAgB,sBAAkB,CAAC;IAC1F,IAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACtC,IAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IACnF,IAAM,OAAO,GAAG,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IAEzE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;IAEtD,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,EAAE;QACjC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC3C,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;KACxD;IAED,IAAI,WAAW,EAAE;QACb,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;KACpC;IAED,IAAM,WAAW,GAAG,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAE7F,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,iBAAiB,CACb,KAAK,EACL,WAAW,EACX,OAAO,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAChD,OAAO,EACP,gBAAgB,EAChB,OAAO,CACV,CAAC;QAEF,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAE7B,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAC5C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEtC,OAAO,IAAI,CAAC;IAChB,CAAC,EACD;QACI,iBAAiB,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;QACtE,YAAY,EAAE,YAAY,CAAC,YAAY;QACvC,aAAa,EAAE,cAAM,OAAA,CAAC;YAClB,OAAO,SAAA;YACP,IAAI,MAAA;YACJ,EAAE,EAAE,EAAE;YACN,UAAU,EAAE,IAAI;SACnB,CAAC,EALmB,CAKnB;QACF,OAAO,EAAE,cAAc;KAC1B,CACJ,CAAC;IAEF,OAAO,WAAW,CAAC;AACvB,CAAC","sourcesContent":["import { ChangeSource } from 'roosterjs-content-model-core';\r\nimport { createEntity, normalizeContentModel } from 'roosterjs-content-model-dom';\r\nimport { insertEntityModel } from '../../modelApi/entity/insertEntityModel';\r\nimport type {\r\n ContentModelEntity,\r\n DOMSelection,\r\n InsertEntityPosition,\r\n InsertEntityOptions,\r\n IStandaloneEditor,\r\n} from 'roosterjs-content-model-types';\r\n\r\nconst BlockEntityTag = 'div';\r\nconst InlineEntityTag = 'span';\r\n\r\n/**\r\n * Insert an entity into editor\r\n * @param editor The Content Model editor\r\n * @param type Type of entity\r\n * @param isBlock True to insert a block entity, false to insert an inline entity\r\n * @param position Position of the entity to insert. It can be\r\n * Value of InsertEntityPosition: see InsertEntityPosition\r\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\r\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\r\n * @param options Move options to insert. See InsertEntityOptions\r\n */\r\nexport default function insertEntity(\r\n editor: IStandaloneEditor,\r\n type: string,\r\n isBlock: boolean,\r\n position: 'focus' | 'begin' | 'end' | DOMSelection,\r\n options?: InsertEntityOptions\r\n): ContentModelEntity | null;\r\n\r\n/**\r\n * Insert a block entity into editor\r\n * @param editor The Content Model editor\r\n * @param type Type of entity\r\n * @param isBlock Must be true for a block entity\r\n * @param position Position of the entity to insert. It can be\r\n * Value of InsertEntityPosition: see InsertEntityPosition\r\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\r\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\r\n * @param options Move options to insert. See InsertEntityOptions\r\n */\r\nexport default function insertEntity(\r\n editor: IStandaloneEditor,\r\n type: string,\r\n isBlock: true,\r\n position: InsertEntityPosition | DOMSelection,\r\n options?: InsertEntityOptions\r\n): ContentModelEntity | null;\r\n\r\nexport default function insertEntity(\r\n editor: IStandaloneEditor,\r\n type: string,\r\n isBlock: boolean,\r\n position?: InsertEntityPosition | DOMSelection,\r\n options?: InsertEntityOptions\r\n): ContentModelEntity | null {\r\n const { contentNode, focusAfterEntity, wrapperDisplay, skipUndoSnapshot } = options || {};\r\n const document = editor.getDocument();\r\n const wrapper = document.createElement(isBlock ? BlockEntityTag : InlineEntityTag);\r\n const display = wrapperDisplay ?? (isBlock ? undefined : 'inline-block');\r\n\r\n wrapper.style.setProperty('display', display || null);\r\n\r\n if (display == undefined && isBlock) {\r\n wrapper.style.setProperty('width', '100%');\r\n wrapper.style.setProperty('display', 'inline-block');\r\n }\r\n\r\n if (contentNode) {\r\n wrapper.appendChild(contentNode);\r\n }\r\n\r\n const entityModel = createEntity(wrapper, true /* isReadonly */, undefined /*format*/, type);\r\n\r\n editor.formatContentModel(\r\n (model, context) => {\r\n insertEntityModel(\r\n model,\r\n entityModel,\r\n typeof position == 'string' ? position : 'focus',\r\n isBlock,\r\n focusAfterEntity,\r\n context\r\n );\r\n\r\n normalizeContentModel(model);\r\n\r\n context.skipUndoSnapshot = skipUndoSnapshot;\r\n context.newEntities.push(entityModel);\r\n\r\n return true;\r\n },\r\n {\r\n selectionOverride: typeof position === 'object' ? position : undefined,\r\n changeSource: ChangeSource.InsertEntity,\r\n getChangeData: () => ({\r\n wrapper,\r\n type,\r\n id: '',\r\n isReadonly: true,\r\n }),\r\n apiName: 'insertEntity',\r\n }\r\n );\r\n\r\n return entityModel;\r\n}\r\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,20 +1,20 @@
|
|
|
1
|
-
import { clearModelFormat } from '../../modelApi/common/clearModelFormat';
|
|
2
|
-
import { normalizeContentModel } from 'roosterjs-content-model-dom';
|
|
3
|
-
/**
|
|
4
|
-
* Clear format of selection
|
|
5
|
-
* @param editor The editor to clear format from
|
|
6
|
-
*/
|
|
7
|
-
export default function clearFormat(editor) {
|
|
8
|
-
editor.focus();
|
|
9
|
-
editor.formatContentModel(function (model) {
|
|
10
|
-
var blocksToClear = [];
|
|
11
|
-
var segmentsToClear = [];
|
|
12
|
-
var tablesToClear = [];
|
|
13
|
-
clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);
|
|
14
|
-
normalizeContentModel(model);
|
|
15
|
-
return (blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0);
|
|
16
|
-
}, {
|
|
17
|
-
apiName: 'clearFormat',
|
|
18
|
-
});
|
|
19
|
-
}
|
|
1
|
+
import { clearModelFormat } from '../../modelApi/common/clearModelFormat';
|
|
2
|
+
import { normalizeContentModel } from 'roosterjs-content-model-dom';
|
|
3
|
+
/**
|
|
4
|
+
* Clear format of selection
|
|
5
|
+
* @param editor The editor to clear format from
|
|
6
|
+
*/
|
|
7
|
+
export default function clearFormat(editor) {
|
|
8
|
+
editor.focus();
|
|
9
|
+
editor.formatContentModel(function (model) {
|
|
10
|
+
var blocksToClear = [];
|
|
11
|
+
var segmentsToClear = [];
|
|
12
|
+
var tablesToClear = [];
|
|
13
|
+
clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);
|
|
14
|
+
normalizeContentModel(model);
|
|
15
|
+
return (blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0);
|
|
16
|
+
}, {
|
|
17
|
+
apiName: 'clearFormat',
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
20
|
//# 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":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AASpE;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAyB;IACzD,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,IAAM,aAAa,GAAoD,EAAE,CAAC;QAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;QAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;QAEzD,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;QAEvE,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAE7B,OAAO,CACH,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CACrF,CAAC;IACN,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC","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
|
+
{"version":3,"file":"clearFormat.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/clearFormat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AASpE;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAyB;IACzD,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,IAAM,aAAa,GAAoD,EAAE,CAAC;QAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;QAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;QAEzD,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;QAEvE,qBAAqB,CAAC,KAAK,CAAC,CAAC;QAE7B,OAAO,CACH,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CACrF,CAAC;IACN,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC","sourcesContent":["import { clearModelFormat } from '../../modelApi/common/clearModelFormat';\r\nimport { normalizeContentModel } from 'roosterjs-content-model-dom';\r\nimport type {\r\n IStandaloneEditor,\r\n ContentModelBlock,\r\n ContentModelBlockGroup,\r\n ContentModelSegment,\r\n ContentModelTable,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Clear format of selection\r\n * @param editor The editor to clear format from\r\n */\r\nexport default function clearFormat(editor: IStandaloneEditor) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n const blocksToClear: [ContentModelBlockGroup[], ContentModelBlock][] = [];\r\n const segmentsToClear: ContentModelSegment[] = [];\r\n const tablesToClear: [ContentModelTable, boolean][] = [];\r\n\r\n clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);\r\n\r\n normalizeContentModel(model);\r\n\r\n return (\r\n blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0\r\n );\r\n },\r\n {\r\n apiName: 'clearFormat',\r\n }\r\n );\r\n}\r\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,18 +1,18 @@
|
|
|
1
|
-
import { retrieveModelFormatState } from '
|
|
2
|
-
/**
|
|
3
|
-
* Get current format state
|
|
4
|
-
* @param editor The editor to get format from
|
|
5
|
-
*/
|
|
6
|
-
export default function getFormatState(editor) {
|
|
7
|
-
var pendingFormat = editor.getPendingFormat();
|
|
8
|
-
var model = editor.getContentModelCopy('reduced');
|
|
9
|
-
var manager = editor.getSnapshotsManager();
|
|
10
|
-
var result = {
|
|
11
|
-
canUndo: manager.hasNewContent || manager.canMove(-1),
|
|
12
|
-
canRedo: manager.canMove(1),
|
|
13
|
-
isDarkMode: editor.isDarkMode(),
|
|
14
|
-
};
|
|
15
|
-
retrieveModelFormatState(model, pendingFormat, result);
|
|
16
|
-
return result;
|
|
17
|
-
}
|
|
1
|
+
import { retrieveModelFormatState } from 'roosterjs-content-model-core';
|
|
2
|
+
/**
|
|
3
|
+
* Get current format state
|
|
4
|
+
* @param editor The editor to get format from
|
|
5
|
+
*/
|
|
6
|
+
export default function getFormatState(editor) {
|
|
7
|
+
var pendingFormat = editor.getPendingFormat();
|
|
8
|
+
var model = editor.getContentModelCopy('reduced');
|
|
9
|
+
var manager = editor.getSnapshotsManager();
|
|
10
|
+
var result = {
|
|
11
|
+
canUndo: manager.hasNewContent || manager.canMove(-1),
|
|
12
|
+
canRedo: manager.canMove(1),
|
|
13
|
+
isDarkMode: editor.isDarkMode(),
|
|
14
|
+
};
|
|
15
|
+
retrieveModelFormatState(model, pendingFormat, result);
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
18
|
//# 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":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getFormatState.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/getFormatState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAGxE;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,MAAyB;IAC5D,IAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAChD,IAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACpD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;IAC7C,IAAM,MAAM,GAA4B;QACpC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;KAClC,CAAC;IAEF,wBAAwB,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;IAEvD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { retrieveModelFormatState } from 'roosterjs-content-model-core';\r\nimport type { IStandaloneEditor, ContentModelFormatState } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Get current format state\r\n * @param editor The editor to get format from\r\n */\r\nexport default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState {\r\n const pendingFormat = editor.getPendingFormat();\r\n const model = editor.getContentModelCopy('reduced');\r\n const manager = editor.getSnapshotsManager();\r\n const result: ContentModelFormatState = {\r\n canUndo: manager.hasNewContent || manager.canMove(-1),\r\n canRedo: manager.canMove(1),\r\n isDarkMode: editor.isDarkMode(),\r\n };\r\n\r\n retrieveModelFormatState(model, pendingFormat, result);\r\n\r\n return result;\r\n}\r\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,23 +1,23 @@
|
|
|
1
|
-
import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';
|
|
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) {
|
|
7
|
-
var image = null;
|
|
8
|
-
editor.formatContentModel(function (model) {
|
|
9
|
-
return adjustSegmentSelection(model, function (target) {
|
|
10
|
-
if (target.isSelected && target.segmentType == 'Image') {
|
|
11
|
-
image = target;
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
}, function (target, ref) { return target == ref; });
|
|
18
|
-
}, {
|
|
19
|
-
apiName: 'adjustImageSelection',
|
|
20
|
-
});
|
|
21
|
-
return image;
|
|
22
|
-
}
|
|
1
|
+
import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';
|
|
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) {
|
|
7
|
+
var image = null;
|
|
8
|
+
editor.formatContentModel(function (model) {
|
|
9
|
+
return adjustSegmentSelection(model, function (target) {
|
|
10
|
+
if (target.isSelected && target.segmentType == 'Image') {
|
|
11
|
+
image = target;
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}, function (target, ref) { return target == ref; });
|
|
18
|
+
}, {
|
|
19
|
+
apiName: 'adjustImageSelection',
|
|
20
|
+
});
|
|
21
|
+
return image;
|
|
22
|
+
}
|
|
23
23
|
//# 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":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAGzF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAyB;IAClE,IAAI,KAAK,GAA6B,IAAI,CAAC;IAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,OAAA,sBAAsB,CAClB,KAAK,EACL,UAAA,MAAM;YACF,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;gBACpD,KAAK,GAAG,MAAM,CAAC;gBACf,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;IAXD,CAWC,EACL;QACI,OAAO,EAAE,sBAAsB;KAClC,CACJ,CAAC;IAEF,OAAO,KAAK,CAAC;AACjB,CAAC","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
|
+
{"version":3,"file":"adjustImageSelection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/adjustImageSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAGzF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,MAAyB;IAClE,IAAI,KAAK,GAA6B,IAAI,CAAC;IAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACD,OAAA,sBAAsB,CAClB,KAAK,EACL,UAAA,MAAM;YACF,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;gBACpD,KAAK,GAAG,MAAM,CAAC;gBACf,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;IAXD,CAWC,EACL;QACI,OAAO,EAAE,sBAAsB;KAClC,CACJ,CAAC;IAEF,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\r\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Adjust selection to make sure select an image if any\r\n * @return Content Model Image object if an image is select, or null\r\n */\r\nexport default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null {\r\n let image: ContentModelImage | null = null;\r\n\r\n editor.formatContentModel(\r\n model =>\r\n adjustSegmentSelection(\r\n model,\r\n target => {\r\n if (target.isSelected && target.segmentType == 'Image') {\r\n image = target;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n (target, ref) => target == ref\r\n ),\r\n {\r\n apiName: 'adjustImageSelection',\r\n }\r\n );\r\n\r\n return image;\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { 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,32 +1,32 @@
|
|
|
1
|
-
import formatImageWithContentModel from '../utils/formatImageWithContentModel';
|
|
2
|
-
import { readFile, updateImageMetadata } from 'roosterjs-content-model-core';
|
|
3
|
-
/**
|
|
4
|
-
* Change the selected image src
|
|
5
|
-
* @param editor The editor instance
|
|
6
|
-
* @param file The image file
|
|
7
|
-
*/
|
|
8
|
-
export default function changeImage(editor, file) {
|
|
9
|
-
editor.focus();
|
|
10
|
-
var selection = editor.getDOMSelection();
|
|
11
|
-
readFile(file, function (dataUrl) {
|
|
12
|
-
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
|
|
13
|
-
formatImageWithContentModel(editor, 'changeImage', function (image) {
|
|
14
|
-
var _a, _b;
|
|
15
|
-
var originalSrc = (_b = (_a = updateImageMetadata(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
|
|
16
|
-
var previousSrc = image.src;
|
|
17
|
-
image.src = dataUrl;
|
|
18
|
-
image.dataset = {};
|
|
19
|
-
image.format.width = '';
|
|
20
|
-
image.format.height = '';
|
|
21
|
-
image.alt = '';
|
|
22
|
-
editor.triggerEvent('editImage', {
|
|
23
|
-
image: selection.image,
|
|
24
|
-
previousSrc: previousSrc,
|
|
25
|
-
newSrc: dataUrl,
|
|
26
|
-
originalSrc: originalSrc,
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
1
|
+
import formatImageWithContentModel from '../utils/formatImageWithContentModel';
|
|
2
|
+
import { readFile, updateImageMetadata } from 'roosterjs-content-model-core';
|
|
3
|
+
/**
|
|
4
|
+
* Change the selected image src
|
|
5
|
+
* @param editor The editor instance
|
|
6
|
+
* @param file The image file
|
|
7
|
+
*/
|
|
8
|
+
export default function changeImage(editor, file) {
|
|
9
|
+
editor.focus();
|
|
10
|
+
var selection = editor.getDOMSelection();
|
|
11
|
+
readFile(file, function (dataUrl) {
|
|
12
|
+
if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
|
|
13
|
+
formatImageWithContentModel(editor, 'changeImage', function (image) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
var originalSrc = (_b = (_a = updateImageMetadata(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
|
|
16
|
+
var previousSrc = image.src;
|
|
17
|
+
image.src = dataUrl;
|
|
18
|
+
image.dataset = {};
|
|
19
|
+
image.format.width = '';
|
|
20
|
+
image.format.height = '';
|
|
21
|
+
image.alt = '';
|
|
22
|
+
editor.triggerEvent('editImage', {
|
|
23
|
+
image: selection.image,
|
|
24
|
+
previousSrc: previousSrc,
|
|
25
|
+
newSrc: dataUrl,
|
|
26
|
+
originalSrc: originalSrc,
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
32
|
//# 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":"AAAA,OAAO,2BAA2B,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAG7E;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAyB,EAAE,IAAU;IACrE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,UAAA,OAAO;QAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;YAChE,2BAA2B,CAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;gBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,mBAAmB,CAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;gBAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;gBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;gBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;gBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;gBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;gBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;gBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;oBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;oBACtB,WAAW,aAAA;oBACX,MAAM,EAAE,OAAO;oBACf,WAAW,aAAA;iBACd,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;SACN;IACL,CAAC,CAAC,CAAC;AACP,CAAC","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
|
+
{"version":3,"file":"changeImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/changeImage.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAG7E;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAyB,EAAE,IAAU;IACrE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,UAAA,OAAO;QAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;YAChE,2BAA2B,CAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;gBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,mBAAmB,CAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;gBAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;gBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;gBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;gBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;gBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;gBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;gBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;oBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;oBACtB,WAAW,aAAA;oBACX,MAAM,EAAE,OAAO;oBACf,WAAW,aAAA;iBACd,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;SACN;IACL,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import formatImageWithContentModel from '../utils/formatImageWithContentModel';\r\nimport { readFile, updateImageMetadata } from 'roosterjs-content-model-core';\r\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Change the selected image src\r\n * @param editor The editor instance\r\n * @param file The image file\r\n */\r\nexport default function changeImage(editor: IStandaloneEditor, file: File) {\r\n editor.focus();\r\n\r\n const selection = editor.getDOMSelection();\r\n readFile(file, dataUrl => {\r\n if (dataUrl && !editor.isDisposed() && selection?.type === 'image') {\r\n formatImageWithContentModel(editor, 'changeImage', (image: ContentModelImage) => {\r\n const originalSrc = updateImageMetadata(image)?.src ?? '';\r\n const previousSrc = image.src;\r\n\r\n image.src = dataUrl;\r\n image.dataset = {};\r\n image.format.width = '';\r\n image.format.height = '';\r\n image.alt = '';\r\n\r\n editor.triggerEvent('editImage', {\r\n image: selection.image,\r\n previousSrc,\r\n newSrc: dataUrl,\r\n originalSrc,\r\n });\r\n });\r\n }\r\n });\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { 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,34 +1,34 @@
|
|
|
1
|
-
import { addSegment, createContentModelDocument, createImage } from 'roosterjs-content-model-dom';
|
|
2
|
-
import { mergeModel, readFile } from 'roosterjs-content-model-core';
|
|
3
|
-
/**
|
|
4
|
-
* Insert an image into current selected position
|
|
5
|
-
* @param editor The editor to operate on
|
|
6
|
-
* @param file Image Blob file or source string
|
|
7
|
-
*/
|
|
8
|
-
export default function insertImage(editor, imageFileOrSrc) {
|
|
9
|
-
editor.focus();
|
|
10
|
-
if (typeof imageFileOrSrc == 'string') {
|
|
11
|
-
insertImageWithSrc(editor, imageFileOrSrc);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
readFile(imageFileOrSrc, function (dataUrl) {
|
|
15
|
-
if (dataUrl && !editor.isDisposed()) {
|
|
16
|
-
insertImageWithSrc(editor, dataUrl);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function insertImageWithSrc(editor, src) {
|
|
22
|
-
editor.formatContentModel(function (model, context) {
|
|
23
|
-
var image = createImage(src, { backgroundColor: '' });
|
|
24
|
-
var doc = createContentModelDocument();
|
|
25
|
-
addSegment(doc, image);
|
|
26
|
-
mergeModel(model, doc, context, {
|
|
27
|
-
mergeFormat: 'mergeAll',
|
|
28
|
-
});
|
|
29
|
-
return true;
|
|
30
|
-
}, {
|
|
31
|
-
apiName: 'insertImage',
|
|
32
|
-
});
|
|
33
|
-
}
|
|
1
|
+
import { addSegment, createContentModelDocument, createImage } from 'roosterjs-content-model-dom';
|
|
2
|
+
import { mergeModel, readFile } from 'roosterjs-content-model-core';
|
|
3
|
+
/**
|
|
4
|
+
* Insert an image into current selected position
|
|
5
|
+
* @param editor The editor to operate on
|
|
6
|
+
* @param file Image Blob file or source string
|
|
7
|
+
*/
|
|
8
|
+
export default function insertImage(editor, imageFileOrSrc) {
|
|
9
|
+
editor.focus();
|
|
10
|
+
if (typeof imageFileOrSrc == 'string') {
|
|
11
|
+
insertImageWithSrc(editor, imageFileOrSrc);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
readFile(imageFileOrSrc, function (dataUrl) {
|
|
15
|
+
if (dataUrl && !editor.isDisposed()) {
|
|
16
|
+
insertImageWithSrc(editor, dataUrl);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function insertImageWithSrc(editor, src) {
|
|
22
|
+
editor.formatContentModel(function (model, context) {
|
|
23
|
+
var image = createImage(src, { backgroundColor: '' });
|
|
24
|
+
var doc = createContentModelDocument();
|
|
25
|
+
addSegment(doc, image);
|
|
26
|
+
mergeModel(model, doc, context, {
|
|
27
|
+
mergeFormat: 'mergeAll',
|
|
28
|
+
});
|
|
29
|
+
return true;
|
|
30
|
+
}, {
|
|
31
|
+
apiName: 'insertImage',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
34
|
//# 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":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGpE;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAyB,EAAE,cAA6B;IACxF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAI,OAAO,cAAc,IAAI,QAAQ,EAAE;QACnC,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;KAC9C;SAAM;QACH,QAAQ,CAAC,cAAc,EAAE,UAAA,OAAO;YAC5B,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;gBACjC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aACvC;QACL,CAAC,CAAC,CAAC;KACN;AACL,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAyB,EAAE,GAAW;IAC9D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,IAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;QAEzC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvB,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;YAC5B,WAAW,EAAE,UAAU;SAC1B,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,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"]}
|
|
1
|
+
{"version":3,"file":"insertImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/insertImage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGpE;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAyB,EAAE,cAA6B;IACxF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAI,OAAO,cAAc,IAAI,QAAQ,EAAE;QACnC,kBAAkB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;KAC9C;SAAM;QACH,QAAQ,CAAC,cAAc,EAAE,UAAA,OAAO;YAC5B,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;gBACjC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aACvC;QACL,CAAC,CAAC,CAAC;KACN;AACL,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAyB,EAAE,GAAW;IAC9D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;QACxD,IAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;QAEzC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvB,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;YAC5B,WAAW,EAAE,UAAU;SAC1B,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC","sourcesContent":["import { addSegment, createContentModelDocument, createImage } from 'roosterjs-content-model-dom';\r\nimport { mergeModel, readFile } from 'roosterjs-content-model-core';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Insert an image into current selected position\r\n * @param editor The editor to operate on\r\n * @param file Image Blob file or source string\r\n */\r\nexport default function insertImage(editor: IStandaloneEditor, imageFileOrSrc: File | string) {\r\n editor.focus();\r\n\r\n if (typeof imageFileOrSrc == 'string') {\r\n insertImageWithSrc(editor, imageFileOrSrc);\r\n } else {\r\n readFile(imageFileOrSrc, dataUrl => {\r\n if (dataUrl && !editor.isDisposed()) {\r\n insertImageWithSrc(editor, dataUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction insertImageWithSrc(editor: IStandaloneEditor, src: string) {\r\n editor.formatContentModel(\r\n (model, context) => {\r\n const image = createImage(src, { backgroundColor: '' });\r\n const doc = createContentModelDocument();\r\n\r\n addSegment(doc, image);\r\n mergeModel(model, doc, context, {\r\n mergeFormat: 'mergeAll',\r\n });\r\n\r\n return true;\r\n },\r\n {\r\n apiName: 'insertImage',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
-
* in selection, do nothing.
|
|
5
|
-
* @param editor The editor instance
|
|
6
|
-
* @param altText The image alt text
|
|
7
|
-
*/
|
|
8
|
-
export default function setImageAltText(editor: IStandaloneEditor, altText: string): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
+
* in selection, do nothing.
|
|
5
|
+
* @param editor The editor instance
|
|
6
|
+
* @param altText The image alt text
|
|
7
|
+
*/
|
|
8
|
+
export default function setImageAltText(editor: IStandaloneEditor, altText: string): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import formatImageWithContentModel from '../utils/formatImageWithContentModel';
|
|
2
|
-
/**
|
|
3
|
-
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
-
* in selection, do nothing.
|
|
5
|
-
* @param editor The editor instance
|
|
6
|
-
* @param altText The image alt text
|
|
7
|
-
*/
|
|
8
|
-
export default function setImageAltText(editor, altText) {
|
|
9
|
-
editor.focus();
|
|
10
|
-
formatImageWithContentModel(editor, 'setImageAltText', function (image) {
|
|
11
|
-
image.alt = altText;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import formatImageWithContentModel from '../utils/formatImageWithContentModel';
|
|
2
|
+
/**
|
|
3
|
+
* Set image alt text for all selected images at selection. If no images is contained
|
|
4
|
+
* in selection, do nothing.
|
|
5
|
+
* @param editor The editor instance
|
|
6
|
+
* @param altText The image alt text
|
|
7
|
+
*/
|
|
8
|
+
export default function setImageAltText(editor, altText) {
|
|
9
|
+
editor.focus();
|
|
10
|
+
formatImageWithContentModel(editor, 'setImageAltText', function (image) {
|
|
11
|
+
image.alt = altText;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
14
|
//# sourceMappingURL=setImageAltText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setImageAltText.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/setImageAltText.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,MAAM,sCAAsC,CAAC;AAG/E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAyB,EAAE,OAAe;IAC9E,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAC,KAAwB;QAC5E,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import formatImageWithContentModel from '../utils/formatImageWithContentModel';\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set image alt text for all selected images at selection. If no images is contained\n * in selection, do nothing.\n * @param editor The editor instance\n * @param altText The image alt text\n */\nexport default function setImageAltText(editor: IStandaloneEditor, altText: string) {\n editor.focus();\n\n formatImageWithContentModel(editor, 'setImageAltText', (image: ContentModelImage) => {\n image.alt = altText;\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setImageAltText.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/setImageAltText.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,MAAM,sCAAsC,CAAC;AAG/E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAyB,EAAE,OAAe;IAC9E,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAC,KAAwB;QAC5E,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import formatImageWithContentModel from '../utils/formatImageWithContentModel';\r\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Set image alt text for all selected images at selection. If no images is contained\r\n * in selection, do nothing.\r\n * @param editor The editor instance\r\n * @param altText The image alt text\r\n */\r\nexport default function setImageAltText(editor: IStandaloneEditor, altText: string) {\r\n editor.focus();\r\n\r\n formatImageWithContentModel(editor, 'setImageAltText', (image: ContentModelImage) => {\r\n image.alt = altText;\r\n });\r\n}\r\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Border, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set image border style for all selected images at selection.
|
|
4
|
-
* @param editor The editor instance
|
|
5
|
-
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
6
|
-
* its value will not be changed. Passing null instead of an object will remove the border
|
|
7
|
-
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
8
|
-
*/
|
|
9
|
-
export default function setImageBorder(editor: IStandaloneEditor, border: Border | null, borderRadius?: string): void;
|
|
1
|
+
import type { Border, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set image border style for all selected images at selection.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
6
|
+
* its value will not be changed. Passing null instead of an object will remove the border
|
|
7
|
+
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
8
|
+
*/
|
|
9
|
+
export default function setImageBorder(editor: IStandaloneEditor, border: Border | null, borderRadius?: string): void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import applyImageBorderFormat from '../../modelApi/image/applyImageBorderFormat';
|
|
2
|
-
import formatImageWithContentModel from '../utils/formatImageWithContentModel';
|
|
3
|
-
/**
|
|
4
|
-
* Set image border style for all selected images at selection.
|
|
5
|
-
* @param editor The editor instance
|
|
6
|
-
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
7
|
-
* its value will not be changed. Passing null instead of an object will remove the border
|
|
8
|
-
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
9
|
-
*/
|
|
10
|
-
export default function setImageBorder(editor, border, borderRadius) {
|
|
11
|
-
editor.focus();
|
|
12
|
-
formatImageWithContentModel(editor, 'setImageBorder', function (image) {
|
|
13
|
-
applyImageBorderFormat(image, border, borderRadius);
|
|
14
|
-
});
|
|
15
|
-
}
|
|
1
|
+
import applyImageBorderFormat from '../../modelApi/image/applyImageBorderFormat';
|
|
2
|
+
import formatImageWithContentModel from '../utils/formatImageWithContentModel';
|
|
3
|
+
/**
|
|
4
|
+
* Set image border style for all selected images at selection.
|
|
5
|
+
* @param editor The editor instance
|
|
6
|
+
* @param border the border format object. Ex: { color: 'red', width: '10px', style: 'solid'}, if one of the value in object is undefined
|
|
7
|
+
* its value will not be changed. Passing null instead of an object will remove the border
|
|
8
|
+
* @param borderRadius the border radius value, if undefined, the border radius will keep the actual value
|
|
9
|
+
*/
|
|
10
|
+
export default function setImageBorder(editor, border, borderRadius) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
formatImageWithContentModel(editor, 'setImageBorder', function (image) {
|
|
13
|
+
applyImageBorderFormat(image, border, borderRadius);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
16
|
//# sourceMappingURL=setImageBorder.js.map
|