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,32 +1,32 @@
|
|
|
1
|
-
define(["require", "exports", "../../modelApi/selection/adjustSegmentSelection", "roosterjs-content-model-core"], function (require, exports, adjustSegmentSelection_1, roosterjs_content_model_core_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Remove link at selection. If no links at selection, do nothing.
|
|
6
|
-
* If selection contains multiple links, all of the link styles will be removed.
|
|
7
|
-
* If only part of a link is selected, the whole link style will be removed.
|
|
8
|
-
* @param editor The editor instance
|
|
9
|
-
*/
|
|
10
|
-
function removeLink(editor) {
|
|
11
|
-
editor.focus();
|
|
12
|
-
editor.formatContentModel(function (model) {
|
|
13
|
-
(0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target) { return !!target.isSelected && !!target.link; }, function (target, ref) {
|
|
14
|
-
return target.isSelected || // Expand the selection to any link that is involved. So we can remove multiple links together
|
|
15
|
-
(!!target.link && target.link.format.href == ref.link.format.href);
|
|
16
|
-
});
|
|
17
|
-
var segments = (0, roosterjs_content_model_core_1.getSelectedSegments)(model, false /*includingFormatHolder*/);
|
|
18
|
-
var isChanged = false;
|
|
19
|
-
segments.forEach(function (segment) {
|
|
20
|
-
if (segment.link) {
|
|
21
|
-
isChanged = true;
|
|
22
|
-
delete segment.link;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
return isChanged;
|
|
26
|
-
}, {
|
|
27
|
-
apiName: 'removeLink',
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
exports.default = removeLink;
|
|
31
|
-
});
|
|
1
|
+
define(["require", "exports", "../../modelApi/selection/adjustSegmentSelection", "roosterjs-content-model-core"], function (require, exports, adjustSegmentSelection_1, roosterjs_content_model_core_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Remove link at selection. If no links at selection, do nothing.
|
|
6
|
+
* If selection contains multiple links, all of the link styles will be removed.
|
|
7
|
+
* If only part of a link is selected, the whole link style will be removed.
|
|
8
|
+
* @param editor The editor instance
|
|
9
|
+
*/
|
|
10
|
+
function removeLink(editor) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
editor.formatContentModel(function (model) {
|
|
13
|
+
(0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target) { return !!target.isSelected && !!target.link; }, function (target, ref) {
|
|
14
|
+
return target.isSelected || // Expand the selection to any link that is involved. So we can remove multiple links together
|
|
15
|
+
(!!target.link && target.link.format.href == ref.link.format.href);
|
|
16
|
+
});
|
|
17
|
+
var segments = (0, roosterjs_content_model_core_1.getSelectedSegments)(model, false /*includingFormatHolder*/);
|
|
18
|
+
var isChanged = false;
|
|
19
|
+
segments.forEach(function (segment) {
|
|
20
|
+
if (segment.link) {
|
|
21
|
+
isChanged = true;
|
|
22
|
+
delete segment.link;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return isChanged;
|
|
26
|
+
}, {
|
|
27
|
+
apiName: 'removeLink',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
exports.default = removeLink;
|
|
31
|
+
});
|
|
32
32
|
//# sourceMappingURL=removeLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeLink.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/link/removeLink.ts"],"names":[],"mappings":";;;IAIA;;;;;OAKG;IACH,SAAwB,UAAU,CAAC,MAAyB;QACxD,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAA,MAAM,IAAI,OAAA,CAAC,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAApC,CAAoC,EAC9C,UAAC,MAAM,EAAE,GAAG;gBACR,OAAA,MAAM,CAAC,UAAU,IAAI,8FAA8F;oBACnH,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC,IAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YADnE,CACmE,CAC1E,CAAC;YAEF,IAAM,QAAQ,GAAG,IAAA,kDAAmB,EAAC,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7E,IAAI,SAAS,GAAG,KAAK,CAAC;YAEtB,QAAQ,CAAC,OAAO,CAAC,UAAA,OAAO;gBACpB,IAAI,OAAO,CAAC,IAAI,EAAE;oBACd,SAAS,GAAG,IAAI,CAAC;oBAEjB,OAAO,OAAO,CAAC,IAAI,CAAC;iBACvB;YACL,CAAC,CAAC,CAAC;YAEH,OAAO,SAAS,CAAC;QACrB,CAAC,EACD;YACI,OAAO,EAAE,YAAY;SACxB,CACJ,CAAC;IACN,CAAC;IA9BD,6BA8BC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\nimport { getSelectedSegments } from 'roosterjs-content-model-core';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Remove link at selection. If no links at selection, do nothing.\n * If selection contains multiple links, all of the link styles will be removed.\n * If only part of a link is selected, the whole link style will be removed.\n * @param editor The editor instance\n */\nexport default function removeLink(editor: IStandaloneEditor) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n adjustSegmentSelection(\n model,\n target => !!target.isSelected && !!target.link,\n (target, ref) =>\n target.isSelected || // Expand the selection to any link that is involved. So we can remove multiple links together\n (!!target.link && target.link.format.href == ref.link!.format.href)\n );\n\n const segments = getSelectedSegments(model, false /*includingFormatHolder*/);\n let isChanged = false;\n\n segments.forEach(segment => {\n if (segment.link) {\n isChanged = true;\n\n delete segment.link;\n }\n });\n\n return isChanged;\n },\n {\n apiName: 'removeLink',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"removeLink.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/link/removeLink.ts"],"names":[],"mappings":";;;IAIA;;;;;OAKG;IACH,SAAwB,UAAU,CAAC,MAAyB;QACxD,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAA,MAAM,IAAI,OAAA,CAAC,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAApC,CAAoC,EAC9C,UAAC,MAAM,EAAE,GAAG;gBACR,OAAA,MAAM,CAAC,UAAU,IAAI,8FAA8F;oBACnH,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC,IAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YADnE,CACmE,CAC1E,CAAC;YAEF,IAAM,QAAQ,GAAG,IAAA,kDAAmB,EAAC,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7E,IAAI,SAAS,GAAG,KAAK,CAAC;YAEtB,QAAQ,CAAC,OAAO,CAAC,UAAA,OAAO;gBACpB,IAAI,OAAO,CAAC,IAAI,EAAE;oBACd,SAAS,GAAG,IAAI,CAAC;oBAEjB,OAAO,OAAO,CAAC,IAAI,CAAC;iBACvB;YACL,CAAC,CAAC,CAAC;YAEH,OAAO,SAAS,CAAC;QACrB,CAAC,EACD;YACI,OAAO,EAAE,YAAY;SACxB,CACJ,CAAC;IACN,CAAC;IA9BD,6BA8BC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\r\nimport { getSelectedSegments } from 'roosterjs-content-model-core';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Remove link at selection. If no links at selection, do nothing.\r\n * If selection contains multiple links, all of the link styles will be removed.\r\n * If only part of a link is selected, the whole link style will be removed.\r\n * @param editor The editor instance\r\n */\r\nexport default function removeLink(editor: IStandaloneEditor) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n adjustSegmentSelection(\r\n model,\r\n target => !!target.isSelected && !!target.link,\r\n (target, ref) =>\r\n target.isSelected || // Expand the selection to any link that is involved. So we can remove multiple links together\r\n (!!target.link && target.link.format.href == ref.link!.format.href)\r\n );\r\n\r\n const segments = getSelectedSegments(model, false /*includingFormatHolder*/);\r\n let isChanged = false;\r\n\r\n segments.forEach(segment => {\r\n if (segment.link) {\r\n isChanged = true;\r\n\r\n delete segment.link;\r\n }\r\n });\r\n\r\n return isChanged;\r\n },\r\n {\r\n apiName: 'removeLink',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set start number of a list item
|
|
4
|
-
* @param editor The editor to operate on
|
|
5
|
-
* @param value The number to set to, must be equal or greater than 1
|
|
6
|
-
*/
|
|
7
|
-
export default function setListStartNumber(editor: IStandaloneEditor, value: number): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set start number of a list item
|
|
4
|
+
* @param editor The editor to operate on
|
|
5
|
+
* @param value The number to set to, must be equal or greater than 1
|
|
6
|
+
*/
|
|
7
|
+
export default function setListStartNumber(editor: IStandaloneEditor, value: number): void;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
define(["require", "exports", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_core_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Set start number of a list item
|
|
6
|
-
* @param editor The editor to operate on
|
|
7
|
-
* @param value The number to set to, must be equal or greater than 1
|
|
8
|
-
*/
|
|
9
|
-
function setListStartNumber(editor, value) {
|
|
10
|
-
editor.focus();
|
|
11
|
-
editor.formatContentModel(function (model) {
|
|
12
|
-
var listItem = (0, roosterjs_content_model_core_1.getFirstSelectedListItem)(model);
|
|
13
|
-
var level = listItem === null || listItem === void 0 ? void 0 : listItem.levels[(listItem === null || listItem === void 0 ? void 0 : listItem.levels.length) - 1];
|
|
14
|
-
if (level) {
|
|
15
|
-
level.format.startNumberOverride = value;
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
}, {
|
|
22
|
-
apiName: 'setListStartNumber',
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
exports.default = setListStartNumber;
|
|
26
|
-
});
|
|
1
|
+
define(["require", "exports", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_core_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Set start number of a list item
|
|
6
|
+
* @param editor The editor to operate on
|
|
7
|
+
* @param value The number to set to, must be equal or greater than 1
|
|
8
|
+
*/
|
|
9
|
+
function setListStartNumber(editor, value) {
|
|
10
|
+
editor.focus();
|
|
11
|
+
editor.formatContentModel(function (model) {
|
|
12
|
+
var listItem = (0, roosterjs_content_model_core_1.getFirstSelectedListItem)(model);
|
|
13
|
+
var level = listItem === null || listItem === void 0 ? void 0 : listItem.levels[(listItem === null || listItem === void 0 ? void 0 : listItem.levels.length) - 1];
|
|
14
|
+
if (level) {
|
|
15
|
+
level.format.startNumberOverride = value;
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}, {
|
|
22
|
+
apiName: 'setListStartNumber',
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.default = setListStartNumber;
|
|
26
|
+
});
|
|
27
27
|
//# sourceMappingURL=setListStartNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setListStartNumber.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/setListStartNumber.ts"],"names":[],"mappings":";;;IAGA;;;;OAIG;IACH,SAAwB,kBAAkB,CAAC,MAAyB,EAAE,KAAa;QAC/E,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,QAAQ,GAAG,IAAA,uDAAwB,EAAC,KAAK,CAAC,CAAC;YACjD,IAAM,KAAK,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,MAAM,IAAG,CAAC,CAAC,CAAC;YAE5D,IAAI,KAAK,EAAE;gBACP,KAAK,CAAC,MAAM,CAAC,mBAAmB,GAAG,KAAK,CAAC;gBAEzC,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD;YACI,OAAO,EAAE,oBAAoB;SAChC,CACJ,CAAC;IACN,CAAC;IApBD,qCAoBC","sourcesContent":["import { getFirstSelectedListItem } from 'roosterjs-content-model-core';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set start number of a list item\n * @param editor The editor to operate on\n * @param value The number to set to, must be equal or greater than 1\n */\nexport default function setListStartNumber(editor: IStandaloneEditor, value: number) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n const listItem = getFirstSelectedListItem(model);\n const level = listItem?.levels[listItem?.levels.length - 1];\n\n if (level) {\n level.format.startNumberOverride = value;\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName: 'setListStartNumber',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setListStartNumber.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/setListStartNumber.ts"],"names":[],"mappings":";;;IAGA;;;;OAIG;IACH,SAAwB,kBAAkB,CAAC,MAAyB,EAAE,KAAa;QAC/E,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,QAAQ,GAAG,IAAA,uDAAwB,EAAC,KAAK,CAAC,CAAC;YACjD,IAAM,KAAK,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,MAAM,IAAG,CAAC,CAAC,CAAC;YAE5D,IAAI,KAAK,EAAE;gBACP,KAAK,CAAC,MAAM,CAAC,mBAAmB,GAAG,KAAK,CAAC;gBAEzC,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD;YACI,OAAO,EAAE,oBAAoB;SAChC,CACJ,CAAC;IACN,CAAC;IApBD,qCAoBC","sourcesContent":["import { getFirstSelectedListItem } from 'roosterjs-content-model-core';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Set start number of a list item\r\n * @param editor The editor to operate on\r\n * @param value The number to set to, must be equal or greater than 1\r\n */\r\nexport default function setListStartNumber(editor: IStandaloneEditor, value: number) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n const listItem = getFirstSelectedListItem(model);\r\n const level = listItem?.levels[listItem?.levels.length - 1];\r\n\r\n if (level) {\r\n level.format.startNumberOverride = value;\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n {\r\n apiName: 'setListStartNumber',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IStandaloneEditor, ListMetadataFormat } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Set style of list items with in same thread of current item
|
|
4
|
-
* @param editor The editor to operate on
|
|
5
|
-
* @param style The target list item style to set
|
|
6
|
-
*/
|
|
7
|
-
export default function setListStyle(editor: IStandaloneEditor, style: ListMetadataFormat): void;
|
|
1
|
+
import type { IStandaloneEditor, ListMetadataFormat } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set style of list items with in same thread of current item
|
|
4
|
+
* @param editor The editor to operate on
|
|
5
|
+
* @param style The target list item style to set
|
|
6
|
+
*/
|
|
7
|
+
export default function setListStyle(editor: IStandaloneEditor, style: ListMetadataFormat): void;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
define(["require", "exports", "../../modelApi/list/findListItemsInSameThread", "roosterjs-content-model-core"], function (require, exports, findListItemsInSameThread_1, roosterjs_content_model_core_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Set style of list items with in same thread of current item
|
|
6
|
-
* @param editor The editor to operate on
|
|
7
|
-
* @param style The target list item style to set
|
|
8
|
-
*/
|
|
9
|
-
function setListStyle(editor, style) {
|
|
10
|
-
editor.focus();
|
|
11
|
-
editor.formatContentModel(function (model) {
|
|
12
|
-
var listItem = (0, roosterjs_content_model_core_1.getFirstSelectedListItem)(model);
|
|
13
|
-
if (listItem) {
|
|
14
|
-
var listItems = (0, findListItemsInSameThread_1.findListItemsInSameThread)(model, listItem);
|
|
15
|
-
var levelIndex_1 = listItem.levels.length - 1;
|
|
16
|
-
listItems.forEach(function (listItem) {
|
|
17
|
-
var level = listItem.levels[levelIndex_1];
|
|
18
|
-
if (level) {
|
|
19
|
-
(0, roosterjs_content_model_core_1.updateListMetadata)(level, function (metadata) { return Object.assign({}, metadata, style); });
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}, {
|
|
28
|
-
apiName: 'setListStyle',
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
exports.default = setListStyle;
|
|
32
|
-
});
|
|
1
|
+
define(["require", "exports", "../../modelApi/list/findListItemsInSameThread", "roosterjs-content-model-core"], function (require, exports, findListItemsInSameThread_1, roosterjs_content_model_core_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Set style of list items with in same thread of current item
|
|
6
|
+
* @param editor The editor to operate on
|
|
7
|
+
* @param style The target list item style to set
|
|
8
|
+
*/
|
|
9
|
+
function setListStyle(editor, style) {
|
|
10
|
+
editor.focus();
|
|
11
|
+
editor.formatContentModel(function (model) {
|
|
12
|
+
var listItem = (0, roosterjs_content_model_core_1.getFirstSelectedListItem)(model);
|
|
13
|
+
if (listItem) {
|
|
14
|
+
var listItems = (0, findListItemsInSameThread_1.findListItemsInSameThread)(model, listItem);
|
|
15
|
+
var levelIndex_1 = listItem.levels.length - 1;
|
|
16
|
+
listItems.forEach(function (listItem) {
|
|
17
|
+
var level = listItem.levels[levelIndex_1];
|
|
18
|
+
if (level) {
|
|
19
|
+
(0, roosterjs_content_model_core_1.updateListMetadata)(level, function (metadata) { return Object.assign({}, metadata, style); });
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
apiName: 'setListStyle',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
exports.default = setListStyle;
|
|
32
|
+
});
|
|
33
33
|
//# sourceMappingURL=setListStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setListStyle.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/setListStyle.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,YAAY,CAAC,MAAyB,EAAE,KAAyB;QACrF,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,QAAQ,GAAG,IAAA,uDAAwB,EAAC,KAAK,CAAC,CAAC;YAEjD,IAAI,QAAQ,EAAE;gBACV,IAAM,SAAS,GAAG,IAAA,qDAAyB,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;gBAC7D,IAAM,YAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;gBAE9C,SAAS,CAAC,OAAO,CAAC,UAAA,QAAQ;oBACtB,IAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAU,CAAC,CAAC;oBAE1C,IAAI,KAAK,EAAE;wBACP,IAAA,iDAAkB,EAAC,KAAK,EAAE,UAAA,QAAQ,IAAI,OAAA,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAlC,CAAkC,CAAC,CAAC;qBAC7E;gBACL,CAAC,CAAC,CAAC;gBAEH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD;YACI,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;IACN,CAAC;IA5BD,+BA4BC","sourcesContent":["import { findListItemsInSameThread } from '../../modelApi/list/findListItemsInSameThread';\nimport { getFirstSelectedListItem, updateListMetadata } from 'roosterjs-content-model-core';\nimport type { IStandaloneEditor, ListMetadataFormat } from 'roosterjs-content-model-types';\n\n/**\n * Set style of list items with in same thread of current item\n * @param editor The editor to operate on\n * @param style The target list item style to set\n */\nexport default function setListStyle(editor: IStandaloneEditor, style: ListMetadataFormat) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n const listItem = getFirstSelectedListItem(model);\n\n if (listItem) {\n const listItems = findListItemsInSameThread(model, listItem);\n const levelIndex = listItem.levels.length - 1;\n\n listItems.forEach(listItem => {\n const level = listItem.levels[levelIndex];\n\n if (level) {\n updateListMetadata(level, metadata => Object.assign({}, metadata, style));\n }\n });\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName: 'setListStyle',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setListStyle.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/setListStyle.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,YAAY,CAAC,MAAyB,EAAE,KAAyB;QACrF,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,QAAQ,GAAG,IAAA,uDAAwB,EAAC,KAAK,CAAC,CAAC;YAEjD,IAAI,QAAQ,EAAE;gBACV,IAAM,SAAS,GAAG,IAAA,qDAAyB,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;gBAC7D,IAAM,YAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;gBAE9C,SAAS,CAAC,OAAO,CAAC,UAAA,QAAQ;oBACtB,IAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAU,CAAC,CAAC;oBAE1C,IAAI,KAAK,EAAE;wBACP,IAAA,iDAAkB,EAAC,KAAK,EAAE,UAAA,QAAQ,IAAI,OAAA,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAlC,CAAkC,CAAC,CAAC;qBAC7E;gBACL,CAAC,CAAC,CAAC;gBAEH,OAAO,IAAI,CAAC;aACf;iBAAM;gBACH,OAAO,KAAK,CAAC;aAChB;QACL,CAAC,EACD;YACI,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;IACN,CAAC;IA5BD,+BA4BC","sourcesContent":["import { findListItemsInSameThread } from '../../modelApi/list/findListItemsInSameThread';\r\nimport { getFirstSelectedListItem, updateListMetadata } from 'roosterjs-content-model-core';\r\nimport type { IStandaloneEditor, ListMetadataFormat } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Set style of list items with in same thread of current item\r\n * @param editor The editor to operate on\r\n * @param style The target list item style to set\r\n */\r\nexport default function setListStyle(editor: IStandaloneEditor, style: ListMetadataFormat) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n const listItem = getFirstSelectedListItem(model);\r\n\r\n if (listItem) {\r\n const listItems = findListItemsInSameThread(model, listItem);\r\n const levelIndex = listItem.levels.length - 1;\r\n\r\n listItems.forEach(listItem => {\r\n const level = listItem.levels[levelIndex];\r\n\r\n if (level) {\r\n updateListMetadata(level, metadata => Object.assign({}, metadata, style));\r\n }\r\n });\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n {\r\n apiName: 'setListStyle',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Toggle bullet list type
|
|
4
|
-
* - When there are some blocks not in bullet list, set all blocks to the given type
|
|
5
|
-
* - When all blocks are already in bullet list, turn off / outdent there list type
|
|
6
|
-
* @param editor The editor to operate on
|
|
7
|
-
*/
|
|
8
|
-
export default function toggleBullet(editor: IStandaloneEditor): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Toggle bullet list type
|
|
4
|
+
* - When there are some blocks not in bullet list, set all blocks to the given type
|
|
5
|
+
* - When all blocks are already in bullet list, turn off / outdent there list type
|
|
6
|
+
* @param editor The editor to operate on
|
|
7
|
+
*/
|
|
8
|
+
export default function toggleBullet(editor: IStandaloneEditor): void;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
define(["require", "exports", "../../modelApi/list/setListType"], function (require, exports, setListType_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Toggle bullet list type
|
|
6
|
-
* - When there are some blocks not in bullet list, set all blocks to the given type
|
|
7
|
-
* - When all blocks are already in bullet list, turn off / outdent there list type
|
|
8
|
-
* @param editor The editor to operate on
|
|
9
|
-
*/
|
|
10
|
-
function toggleBullet(editor) {
|
|
11
|
-
editor.focus();
|
|
12
|
-
editor.formatContentModel(function (model, context) {
|
|
13
|
-
context.newPendingFormat = 'preserve';
|
|
14
|
-
return (0, setListType_1.setListType)(model, 'UL');
|
|
15
|
-
}, {
|
|
16
|
-
apiName: 'toggleBullet',
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.default = toggleBullet;
|
|
20
|
-
});
|
|
1
|
+
define(["require", "exports", "../../modelApi/list/setListType"], function (require, exports, setListType_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Toggle bullet list type
|
|
6
|
+
* - When there are some blocks not in bullet list, set all blocks to the given type
|
|
7
|
+
* - When all blocks are already in bullet list, turn off / outdent there list type
|
|
8
|
+
* @param editor The editor to operate on
|
|
9
|
+
*/
|
|
10
|
+
function toggleBullet(editor) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
editor.formatContentModel(function (model, context) {
|
|
13
|
+
context.newPendingFormat = 'preserve';
|
|
14
|
+
return (0, setListType_1.setListType)(model, 'UL');
|
|
15
|
+
}, {
|
|
16
|
+
apiName: 'toggleBullet',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.default = toggleBullet;
|
|
20
|
+
});
|
|
21
21
|
//# sourceMappingURL=toggleBullet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggleBullet.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/toggleBullet.ts"],"names":[],"mappings":";;;IAGA;;;;;OAKG;IACH,SAAwB,YAAY,CAAC,MAAyB;QAC1D,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;YAEtC,OAAO,IAAA,yBAAW,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC,EACD;YACI,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;IACN,CAAC;IAbD,+BAaC","sourcesContent":["import { setListType } from '../../modelApi/list/setListType';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Toggle bullet list type\n * - When there are some blocks not in bullet list, set all blocks to the given type\n * - When all blocks are already in bullet list, turn off / outdent there list type\n * @param editor The editor to operate on\n */\nexport default function toggleBullet(editor: IStandaloneEditor) {\n editor.focus();\n\n editor.formatContentModel(\n (model, context) => {\n context.newPendingFormat = 'preserve';\n\n return setListType(model, 'UL');\n },\n {\n apiName: 'toggleBullet',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"toggleBullet.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/toggleBullet.ts"],"names":[],"mappings":";;;IAGA;;;;;OAKG;IACH,SAAwB,YAAY,CAAC,MAAyB;QAC1D,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;YAEtC,OAAO,IAAA,yBAAW,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC,EACD;YACI,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;IACN,CAAC;IAbD,+BAaC","sourcesContent":["import { setListType } from '../../modelApi/list/setListType';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Toggle bullet list type\r\n * - When there are some blocks not in bullet list, set all blocks to the given type\r\n * - When all blocks are already in bullet list, turn off / outdent there list type\r\n * @param editor The editor to operate on\r\n */\r\nexport default function toggleBullet(editor: IStandaloneEditor) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n (model, context) => {\r\n context.newPendingFormat = 'preserve';\r\n\r\n return setListType(model, 'UL');\r\n },\r\n {\r\n apiName: 'toggleBullet',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Toggle numbering list type
|
|
4
|
-
* - When there are some blocks not in numbering list, set all blocks to the given type
|
|
5
|
-
* - When all blocks are already in numbering list, turn off / outdent there list type
|
|
6
|
-
* @param editor The editor to operate on
|
|
7
|
-
*/
|
|
8
|
-
export default function toggleNumbering(editor: IStandaloneEditor): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Toggle numbering list type
|
|
4
|
+
* - When there are some blocks not in numbering list, set all blocks to the given type
|
|
5
|
+
* - When all blocks are already in numbering list, turn off / outdent there list type
|
|
6
|
+
* @param editor The editor to operate on
|
|
7
|
+
*/
|
|
8
|
+
export default function toggleNumbering(editor: IStandaloneEditor): void;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
define(["require", "exports", "../../modelApi/list/setListType"], function (require, exports, setListType_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Toggle numbering list type
|
|
6
|
-
* - When there are some blocks not in numbering list, set all blocks to the given type
|
|
7
|
-
* - When all blocks are already in numbering list, turn off / outdent there list type
|
|
8
|
-
* @param editor The editor to operate on
|
|
9
|
-
*/
|
|
10
|
-
function toggleNumbering(editor) {
|
|
11
|
-
editor.focus();
|
|
12
|
-
editor.formatContentModel(function (model, context) {
|
|
13
|
-
context.newPendingFormat = 'preserve';
|
|
14
|
-
return (0, setListType_1.setListType)(model, 'OL');
|
|
15
|
-
}, {
|
|
16
|
-
apiName: 'toggleNumbering',
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.default = toggleNumbering;
|
|
20
|
-
});
|
|
1
|
+
define(["require", "exports", "../../modelApi/list/setListType"], function (require, exports, setListType_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Toggle numbering list type
|
|
6
|
+
* - When there are some blocks not in numbering list, set all blocks to the given type
|
|
7
|
+
* - When all blocks are already in numbering list, turn off / outdent there list type
|
|
8
|
+
* @param editor The editor to operate on
|
|
9
|
+
*/
|
|
10
|
+
function toggleNumbering(editor) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
editor.formatContentModel(function (model, context) {
|
|
13
|
+
context.newPendingFormat = 'preserve';
|
|
14
|
+
return (0, setListType_1.setListType)(model, 'OL');
|
|
15
|
+
}, {
|
|
16
|
+
apiName: 'toggleNumbering',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.default = toggleNumbering;
|
|
20
|
+
});
|
|
21
21
|
//# sourceMappingURL=toggleNumbering.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggleNumbering.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/toggleNumbering.ts"],"names":[],"mappings":";;;IAGA;;;;;OAKG;IACH,SAAwB,eAAe,CAAC,MAAyB;QAC7D,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;YAEtC,OAAO,IAAA,yBAAW,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC,EACD;YACI,OAAO,EAAE,iBAAiB;SAC7B,CACJ,CAAC;IACN,CAAC;IAbD,kCAaC","sourcesContent":["import { setListType } from '../../modelApi/list/setListType';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Toggle numbering list type\n * - When there are some blocks not in numbering list, set all blocks to the given type\n * - When all blocks are already in numbering list, turn off / outdent there list type\n * @param editor The editor to operate on\n */\nexport default function toggleNumbering(editor: IStandaloneEditor) {\n editor.focus();\n\n editor.formatContentModel(\n (model, context) => {\n context.newPendingFormat = 'preserve';\n\n return setListType(model, 'OL');\n },\n {\n apiName: 'toggleNumbering',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"toggleNumbering.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/list/toggleNumbering.ts"],"names":[],"mappings":";;;IAGA;;;;;OAKG;IACH,SAAwB,eAAe,CAAC,MAAyB;QAC7D,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;YAEtC,OAAO,IAAA,yBAAW,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC,EACD;YACI,OAAO,EAAE,iBAAiB;SAC7B,CACJ,CAAC;IACN,CAAC;IAbD,kCAaC","sourcesContent":["import { setListType } from '../../modelApi/list/setListType';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Toggle numbering list type\r\n * - When there are some blocks not in numbering list, set all blocks to the given type\r\n * - When all blocks are already in numbering list, turn off / outdent there list type\r\n * @param editor The editor to operate on\r\n */\r\nexport default function toggleNumbering(editor: IStandaloneEditor) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n (model, context) => {\r\n context.newPendingFormat = 'preserve';\r\n\r\n return setListType(model, 'OL');\r\n },\r\n {\r\n apiName: 'toggleNumbering',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ContentModelSegmentFormat, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Bulk apply segment format to all selected content. This is usually used for format painter.
|
|
4
|
-
* @param editor The editor to operate on
|
|
5
|
-
* @param newFormat The segment format to apply
|
|
6
|
-
*/
|
|
7
|
-
export default function applySegmentFormat(editor: IStandaloneEditor, newFormat: ContentModelSegmentFormat): void;
|
|
1
|
+
import type { ContentModelSegmentFormat, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Bulk apply segment format to all selected content. This is usually used for format painter.
|
|
4
|
+
* @param editor The editor to operate on
|
|
5
|
+
* @param newFormat The segment format to apply
|
|
6
|
+
*/
|
|
7
|
+
export default function applySegmentFormat(editor: IStandaloneEditor, newFormat: ContentModelSegmentFormat): void;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
define(["require", "exports", "../utils/formatSegmentWithContentModel"], function (require, exports, formatSegmentWithContentModel_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Bulk apply segment format to all selected content. This is usually used for format painter.
|
|
6
|
-
* @param editor The editor to operate on
|
|
7
|
-
* @param newFormat The segment format to apply
|
|
8
|
-
*/
|
|
9
|
-
function applySegmentFormat(editor, newFormat) {
|
|
10
|
-
(0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, 'applySegmentFormat', function (format) {
|
|
11
|
-
format.backgroundColor = newFormat.backgroundColor;
|
|
12
|
-
format.fontFamily = newFormat.fontFamily;
|
|
13
|
-
format.fontSize = newFormat.fontSize;
|
|
14
|
-
format.fontWeight = newFormat.fontWeight;
|
|
15
|
-
format.italic = newFormat.italic;
|
|
16
|
-
format.strikethrough = newFormat.strikethrough;
|
|
17
|
-
format.superOrSubScriptSequence = newFormat.superOrSubScriptSequence;
|
|
18
|
-
format.textColor = newFormat.textColor;
|
|
19
|
-
format.underline = newFormat.underline;
|
|
20
|
-
}, undefined /* segmentHasStyleCallback*/, true /*includingFormatHandler*/);
|
|
21
|
-
}
|
|
22
|
-
exports.default = applySegmentFormat;
|
|
23
|
-
});
|
|
1
|
+
define(["require", "exports", "../utils/formatSegmentWithContentModel"], function (require, exports, formatSegmentWithContentModel_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Bulk apply segment format to all selected content. This is usually used for format painter.
|
|
6
|
+
* @param editor The editor to operate on
|
|
7
|
+
* @param newFormat The segment format to apply
|
|
8
|
+
*/
|
|
9
|
+
function applySegmentFormat(editor, newFormat) {
|
|
10
|
+
(0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, 'applySegmentFormat', function (format) {
|
|
11
|
+
format.backgroundColor = newFormat.backgroundColor;
|
|
12
|
+
format.fontFamily = newFormat.fontFamily;
|
|
13
|
+
format.fontSize = newFormat.fontSize;
|
|
14
|
+
format.fontWeight = newFormat.fontWeight;
|
|
15
|
+
format.italic = newFormat.italic;
|
|
16
|
+
format.strikethrough = newFormat.strikethrough;
|
|
17
|
+
format.superOrSubScriptSequence = newFormat.superOrSubScriptSequence;
|
|
18
|
+
format.textColor = newFormat.textColor;
|
|
19
|
+
format.underline = newFormat.underline;
|
|
20
|
+
}, undefined /* segmentHasStyleCallback*/, true /*includingFormatHandler*/);
|
|
21
|
+
}
|
|
22
|
+
exports.default = applySegmentFormat;
|
|
23
|
+
});
|
|
24
24
|
//# sourceMappingURL=applySegmentFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applySegmentFormat.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/segment/applySegmentFormat.ts"],"names":[],"mappings":";;;IAGA;;;;OAIG;IACH,SAAwB,kBAAkB,CACtC,MAAyB,EACzB,SAAoC;QAEpC,IAAA,6DAA6B,EACzB,MAAM,EACN,oBAAoB,EACpB,UAAA,MAAM;YACF,MAAM,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;YACnD,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;YACzC,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YACrC,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;YACzC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;YACjC,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC;YAC/C,MAAM,CAAC,wBAAwB,GAAG,SAAS,CAAC,wBAAwB,CAAC;YACrE,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;YACvC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;QAC3C,CAAC,EACD,SAAS,CAAC,4BAA4B,EACtC,IAAI,CAAC,0BAA0B,CAClC,CAAC;IACN,CAAC;IArBD,qCAqBC","sourcesContent":["import { formatSegmentWithContentModel } from '../utils/formatSegmentWithContentModel';\nimport type { ContentModelSegmentFormat, IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Bulk apply segment format to all selected content. This is usually used for format painter.\n * @param editor The editor to operate on\n * @param newFormat The segment format to apply\n */\nexport default function applySegmentFormat(\n editor: IStandaloneEditor,\n newFormat: ContentModelSegmentFormat\n) {\n formatSegmentWithContentModel(\n editor,\n 'applySegmentFormat',\n format => {\n format.backgroundColor = newFormat.backgroundColor;\n format.fontFamily = newFormat.fontFamily;\n format.fontSize = newFormat.fontSize;\n format.fontWeight = newFormat.fontWeight;\n format.italic = newFormat.italic;\n format.strikethrough = newFormat.strikethrough;\n format.superOrSubScriptSequence = newFormat.superOrSubScriptSequence;\n format.textColor = newFormat.textColor;\n format.underline = newFormat.underline;\n },\n undefined /* segmentHasStyleCallback*/,\n true /*includingFormatHandler*/\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"applySegmentFormat.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/segment/applySegmentFormat.ts"],"names":[],"mappings":";;;IAGA;;;;OAIG;IACH,SAAwB,kBAAkB,CACtC,MAAyB,EACzB,SAAoC;QAEpC,IAAA,6DAA6B,EACzB,MAAM,EACN,oBAAoB,EACpB,UAAA,MAAM;YACF,MAAM,CAAC,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;YACnD,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;YACzC,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YACrC,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;YACzC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;YACjC,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC,aAAa,CAAC;YAC/C,MAAM,CAAC,wBAAwB,GAAG,SAAS,CAAC,wBAAwB,CAAC;YACrE,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;YACvC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;QAC3C,CAAC,EACD,SAAS,CAAC,4BAA4B,EACtC,IAAI,CAAC,0BAA0B,CAClC,CAAC;IACN,CAAC;IArBD,qCAqBC","sourcesContent":["import { formatSegmentWithContentModel } from '../utils/formatSegmentWithContentModel';\r\nimport type { ContentModelSegmentFormat, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Bulk apply segment format to all selected content. This is usually used for format painter.\r\n * @param editor The editor to operate on\r\n * @param newFormat The segment format to apply\r\n */\r\nexport default function applySegmentFormat(\r\n editor: IStandaloneEditor,\r\n newFormat: ContentModelSegmentFormat\r\n) {\r\n formatSegmentWithContentModel(\r\n editor,\r\n 'applySegmentFormat',\r\n format => {\r\n format.backgroundColor = newFormat.backgroundColor;\r\n format.fontFamily = newFormat.fontFamily;\r\n format.fontSize = newFormat.fontSize;\r\n format.fontWeight = newFormat.fontWeight;\r\n format.italic = newFormat.italic;\r\n format.strikethrough = newFormat.strikethrough;\r\n format.superOrSubScriptSequence = newFormat.superOrSubScriptSequence;\r\n format.textColor = newFormat.textColor;\r\n format.underline = newFormat.underline;\r\n },\r\n undefined /* segmentHasStyleCallback*/,\r\n true /*includingFormatHandler*/\r\n );\r\n}\r\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Change the capitalization of text in the selection
|
|
4
|
-
* @param editor The editor instance
|
|
5
|
-
* @param capitalization The case option
|
|
6
|
-
* @param language Optional parameter for language string that should comply to "IETF BCP 47 Tags for
|
|
7
|
-
* Identifying Languages". For example: 'en' or 'en-US' for English, 'tr' for Turkish.
|
|
8
|
-
* Default is the host environment’s current locale.
|
|
9
|
-
*/
|
|
10
|
-
export default function changeCapitalization(editor: IStandaloneEditor, capitalization: 'sentence' | 'lowerCase' | 'upperCase' | 'capitalize', language?: string): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Change the capitalization of text in the selection
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param capitalization The case option
|
|
6
|
+
* @param language Optional parameter for language string that should comply to "IETF BCP 47 Tags for
|
|
7
|
+
* Identifying Languages". For example: 'en' or 'en-US' for English, 'tr' for Turkish.
|
|
8
|
+
* Default is the host environment’s current locale.
|
|
9
|
+
*/
|
|
10
|
+
export default function changeCapitalization(editor: IStandaloneEditor, capitalization: 'sentence' | 'lowerCase' | 'upperCase' | 'capitalize', language?: string): void;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
define(["require", "exports", "../utils/formatSegmentWithContentModel"], function (require, exports, formatSegmentWithContentModel_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Change the capitalization of text in the selection
|
|
6
|
-
* @param editor The editor instance
|
|
7
|
-
* @param capitalization The case option
|
|
8
|
-
* @param language Optional parameter for language string that should comply to "IETF BCP 47 Tags for
|
|
9
|
-
* Identifying Languages". For example: 'en' or 'en-US' for English, 'tr' for Turkish.
|
|
10
|
-
* Default is the host environment’s current locale.
|
|
11
|
-
*/
|
|
12
|
-
function changeCapitalization(editor, capitalization, language) {
|
|
13
|
-
editor.focus();
|
|
14
|
-
(0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, 'changeCapitalization', function (_, __, segment) {
|
|
15
|
-
if ((segment === null || segment === void 0 ? void 0 : segment.segmentType) == 'Text') {
|
|
16
|
-
switch (capitalization) {
|
|
17
|
-
case 'lowerCase':
|
|
18
|
-
segment.text = segment.text.toLocaleLowerCase(language);
|
|
19
|
-
break;
|
|
20
|
-
case 'upperCase':
|
|
21
|
-
segment.text = segment.text.toLocaleUpperCase(language);
|
|
22
|
-
break;
|
|
23
|
-
case 'capitalize':
|
|
24
|
-
var wordArray = segment.text.toLocaleLowerCase(language).split(' ');
|
|
25
|
-
for (var i = 0; i < wordArray.length; i++) {
|
|
26
|
-
wordArray[i] =
|
|
27
|
-
wordArray[i].charAt(0).toLocaleUpperCase(language) +
|
|
28
|
-
wordArray[i].slice(1);
|
|
29
|
-
}
|
|
30
|
-
segment.text = wordArray.join(' ');
|
|
31
|
-
break;
|
|
32
|
-
case 'sentence':
|
|
33
|
-
var punctuationMarks = '[\\.\\!\\?]';
|
|
34
|
-
// Find a match of a word character either:
|
|
35
|
-
// - At the beginning of a string with or without preceding whitespace, for
|
|
36
|
-
// example: ' hello world' and 'hello world' strings would both match 'h'.
|
|
37
|
-
// - Or preceded by a punctuation mark and at least one whitespace, for
|
|
38
|
-
// example 'yes. hello world' would match 'y' and 'h'.
|
|
39
|
-
var regex = new RegExp('^\\s*\\w|' + punctuationMarks + '\\s+\\w', 'g');
|
|
40
|
-
segment.text = segment.text
|
|
41
|
-
.toLocaleLowerCase(language)
|
|
42
|
-
.replace(regex, function (match) { return match.toLocaleUpperCase(language); });
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
exports.default = changeCapitalization;
|
|
49
|
-
});
|
|
1
|
+
define(["require", "exports", "../utils/formatSegmentWithContentModel"], function (require, exports, formatSegmentWithContentModel_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/**
|
|
5
|
+
* Change the capitalization of text in the selection
|
|
6
|
+
* @param editor The editor instance
|
|
7
|
+
* @param capitalization The case option
|
|
8
|
+
* @param language Optional parameter for language string that should comply to "IETF BCP 47 Tags for
|
|
9
|
+
* Identifying Languages". For example: 'en' or 'en-US' for English, 'tr' for Turkish.
|
|
10
|
+
* Default is the host environment’s current locale.
|
|
11
|
+
*/
|
|
12
|
+
function changeCapitalization(editor, capitalization, language) {
|
|
13
|
+
editor.focus();
|
|
14
|
+
(0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, 'changeCapitalization', function (_, __, segment) {
|
|
15
|
+
if ((segment === null || segment === void 0 ? void 0 : segment.segmentType) == 'Text') {
|
|
16
|
+
switch (capitalization) {
|
|
17
|
+
case 'lowerCase':
|
|
18
|
+
segment.text = segment.text.toLocaleLowerCase(language);
|
|
19
|
+
break;
|
|
20
|
+
case 'upperCase':
|
|
21
|
+
segment.text = segment.text.toLocaleUpperCase(language);
|
|
22
|
+
break;
|
|
23
|
+
case 'capitalize':
|
|
24
|
+
var wordArray = segment.text.toLocaleLowerCase(language).split(' ');
|
|
25
|
+
for (var i = 0; i < wordArray.length; i++) {
|
|
26
|
+
wordArray[i] =
|
|
27
|
+
wordArray[i].charAt(0).toLocaleUpperCase(language) +
|
|
28
|
+
wordArray[i].slice(1);
|
|
29
|
+
}
|
|
30
|
+
segment.text = wordArray.join(' ');
|
|
31
|
+
break;
|
|
32
|
+
case 'sentence':
|
|
33
|
+
var punctuationMarks = '[\\.\\!\\?]';
|
|
34
|
+
// Find a match of a word character either:
|
|
35
|
+
// - At the beginning of a string with or without preceding whitespace, for
|
|
36
|
+
// example: ' hello world' and 'hello world' strings would both match 'h'.
|
|
37
|
+
// - Or preceded by a punctuation mark and at least one whitespace, for
|
|
38
|
+
// example 'yes. hello world' would match 'y' and 'h'.
|
|
39
|
+
var regex = new RegExp('^\\s*\\w|' + punctuationMarks + '\\s+\\w', 'g');
|
|
40
|
+
segment.text = segment.text
|
|
41
|
+
.toLocaleLowerCase(language)
|
|
42
|
+
.replace(regex, function (match) { return match.toLocaleUpperCase(language); });
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
exports.default = changeCapitalization;
|
|
49
|
+
});
|
|
50
50
|
//# sourceMappingURL=changeCapitalization.js.map
|