roosterjs-content-model-api 0.24.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 -42
- package/lib/index.js +99 -87
- 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 -69
- 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 -48
- 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 -44
- 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 -0
- package/lib/modelApi/link/matchLink.js +95 -0
- package/lib/modelApi/link/matchLink.js.map +1 -0
- 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 -5
- package/lib/modelApi/list/setListType.js +113 -116
- 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 -34
- 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 -40
- 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 -26
- package/lib/publicApi/format/getFormatState.js +20 -88
- 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 -128
- 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 -49
- package/lib/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib/publicApi/segment/changeFontSize.js +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 -42
- package/lib-amd/index.js +53 -47
- 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 -69
- 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 -47
- 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 -44
- 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 -0
- package/lib-amd/modelApi/link/matchLink.js +95 -0
- package/lib-amd/modelApi/link/matchLink.js.map +1 -0
- 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 -5
- package/lib-amd/modelApi/list/setListType.js +113 -116
- 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 -34
- 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 -39
- 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 -26
- package/lib-amd/publicApi/format/getFormatState.js +21 -86
- 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 -125
- 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 -50
- package/lib-amd/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib-amd/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib-amd/publicApi/segment/changeFontSize.js +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 -42
- package/lib-mjs/index.js +48 -42
- 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 -65
- 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 -44
- 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 -39
- 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 -0
- package/lib-mjs/modelApi/link/matchLink.js +91 -0
- package/lib-mjs/modelApi/link/matchLink.js.map +1 -0
- 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 -5
- package/lib-mjs/modelApi/list/setListType.js +109 -112
- 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 -31
- 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 -37
- 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 -26
- package/lib-mjs/publicApi/format/getFormatState.js +17 -83
- 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 -125
- 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 -46
- 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 -6
- package/lib/modelApi/common/retrieveModelFormatState.d.ts +0 -5
- package/lib/modelApi/common/retrieveModelFormatState.js +0 -173
- 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 -173
- 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 -169
- package/lib-mjs/modelApi/common/retrieveModelFormatState.js.map +0 -1
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var formatParagraphWithContentModel_1 = require("../utils/formatParagraphWithContentModel");
|
|
4
|
-
var HeaderFontSizes = {
|
|
5
|
-
h1: '2em',
|
|
6
|
-
h2: '1.5em',
|
|
7
|
-
h3: '1.17em',
|
|
8
|
-
h4: '1em',
|
|
9
|
-
h5: '0.83em',
|
|
10
|
-
h6: '0.67em',
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Set heading level of selected paragraphs
|
|
14
|
-
* @param editor The editor to set heading level to
|
|
15
|
-
* @param headingLevel Level of heading, from 1 to 6. Set to 0 means set it back to a regular paragraph
|
|
16
|
-
*/
|
|
17
|
-
function setHeadingLevel(editor, headingLevel) {
|
|
18
|
-
editor.focus();
|
|
19
|
-
(0, formatParagraphWithContentModel_1.formatParagraphWithContentModel)(editor, 'setHeadingLevel', function (para) {
|
|
20
|
-
var tagName = headingLevel > 0
|
|
21
|
-
? ('h' + headingLevel)
|
|
22
|
-
: getExistingHeadingTag(para.decorator);
|
|
23
|
-
if (headingLevel > 0) {
|
|
24
|
-
para.decorator = {
|
|
25
|
-
tagName: tagName,
|
|
26
|
-
format: tagName
|
|
27
|
-
? {
|
|
28
|
-
fontWeight: 'bold',
|
|
29
|
-
fontSize: HeaderFontSizes[tagName],
|
|
30
|
-
}
|
|
31
|
-
: {},
|
|
32
|
-
};
|
|
33
|
-
// Remove existing formats since tags have default font size and weight
|
|
34
|
-
para.segments.forEach(function (segment) {
|
|
35
|
-
delete segment.format.fontSize;
|
|
36
|
-
delete segment.format.fontWeight;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
else if (tagName) {
|
|
40
|
-
delete para.decorator;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
exports.default = setHeadingLevel;
|
|
45
|
-
function getExistingHeadingTag(decorator) {
|
|
46
|
-
var tag = (decorator === null || decorator === void 0 ? void 0 : decorator.tagName) || '';
|
|
47
|
-
var level = parseInt(tag.substring(1));
|
|
48
|
-
return level >= 1 && level <= 6 ? tag : null;
|
|
49
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var formatParagraphWithContentModel_1 = require("../utils/formatParagraphWithContentModel");
|
|
4
|
+
var HeaderFontSizes = {
|
|
5
|
+
h1: '2em',
|
|
6
|
+
h2: '1.5em',
|
|
7
|
+
h3: '1.17em',
|
|
8
|
+
h4: '1em',
|
|
9
|
+
h5: '0.83em',
|
|
10
|
+
h6: '0.67em',
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Set heading level of selected paragraphs
|
|
14
|
+
* @param editor The editor to set heading level to
|
|
15
|
+
* @param headingLevel Level of heading, from 1 to 6. Set to 0 means set it back to a regular paragraph
|
|
16
|
+
*/
|
|
17
|
+
function setHeadingLevel(editor, headingLevel) {
|
|
18
|
+
editor.focus();
|
|
19
|
+
(0, formatParagraphWithContentModel_1.formatParagraphWithContentModel)(editor, 'setHeadingLevel', function (para) {
|
|
20
|
+
var tagName = headingLevel > 0
|
|
21
|
+
? ('h' + headingLevel)
|
|
22
|
+
: getExistingHeadingTag(para.decorator);
|
|
23
|
+
if (headingLevel > 0) {
|
|
24
|
+
para.decorator = {
|
|
25
|
+
tagName: tagName,
|
|
26
|
+
format: tagName
|
|
27
|
+
? {
|
|
28
|
+
fontWeight: 'bold',
|
|
29
|
+
fontSize: HeaderFontSizes[tagName],
|
|
30
|
+
}
|
|
31
|
+
: {},
|
|
32
|
+
};
|
|
33
|
+
// Remove existing formats since tags have default font size and weight
|
|
34
|
+
para.segments.forEach(function (segment) {
|
|
35
|
+
delete segment.format.fontSize;
|
|
36
|
+
delete segment.format.fontWeight;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
else if (tagName) {
|
|
40
|
+
delete para.decorator;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
exports.default = setHeadingLevel;
|
|
45
|
+
function getExistingHeadingTag(decorator) {
|
|
46
|
+
var tag = (decorator === null || decorator === void 0 ? void 0 : decorator.tagName) || '';
|
|
47
|
+
var level = parseInt(tag.substring(1));
|
|
48
|
+
return level >= 1 && level <= 6 ? tag : null;
|
|
49
|
+
}
|
|
50
50
|
//# sourceMappingURL=setHeadingLevel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setHeadingLevel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setHeadingLevel.ts"],"names":[],"mappings":";;AAAA,4FAA2F;AAQ3F,IAAM,eAAe,GAAqC;IACtD,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;CACf,CAAC;AAEF;;;;GAIG;AACH,SAAwB,eAAe,CACnC,MAAyB,EACzB,YAAuC;IAEvC,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,iEAA+B,EAAC,MAAM,EAAE,iBAAiB,EAAE,UAAA,IAAI;QAC3D,IAAM,OAAO,GACT,YAAY,GAAG,CAAC;YACZ,CAAC,CAAE,CAAC,GAAG,GAAG,YAAY,CAA6B;YACnD,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEhD,IAAI,YAAY,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,SAAS,GAAG;gBACb,OAAO,EAAE,OAAQ;gBACjB,MAAM,EAAE,OAAO;oBACX,CAAC,CAAC;wBACI,UAAU,EAAE,MAAM;wBAClB,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC;qBACrC;oBACH,CAAC,CAAC,EAAE;aACX,CAAC;YAEF,uEAAuE;YACvE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,OAAO;gBACzB,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;gBAC/B,OAAO,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;YACrC,CAAC,CAAC,CAAC;SACN;aAAM,IAAI,OAAO,EAAE;YAChB,OAAO,IAAI,CAAC,SAAS,CAAC;SACzB;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAhCD,kCAgCC;AAED,SAAS,qBAAqB,CAC1B,SAA0C;IAE1C,IAAM,GAAG,GAAG,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,KAAI,EAAE,CAAC;IACrC,IAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzC,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAE,GAAwB,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC","sourcesContent":["import { formatParagraphWithContentModel } from '../utils/formatParagraphWithContentModel';\nimport type {\n ContentModelParagraphDecorator,\n IStandaloneEditor,\n} from 'roosterjs-content-model-types';\n\ntype HeadingLevelTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nconst HeaderFontSizes: Record<HeadingLevelTags, string> = {\n h1: '2em',\n h2: '1.5em',\n h3: '1.17em',\n h4: '1em',\n h5: '0.83em',\n h6: '0.67em',\n};\n\n/**\n * Set heading level of selected paragraphs\n * @param editor The editor to set heading level to\n * @param headingLevel Level of heading, from 1 to 6. Set to 0 means set it back to a regular paragraph\n */\nexport default function setHeadingLevel(\n editor: IStandaloneEditor,\n headingLevel: 0 | 1 | 2 | 3 | 4 | 5 | 6\n) {\n editor.focus();\n\n formatParagraphWithContentModel(editor, 'setHeadingLevel', para => {\n const tagName =\n headingLevel > 0\n ? (('h' + headingLevel) as HeadingLevelTags | null)\n : getExistingHeadingTag(para.decorator);\n\n if (headingLevel > 0) {\n para.decorator = {\n tagName: tagName!,\n format: tagName\n ? {\n fontWeight: 'bold',\n fontSize: HeaderFontSizes[tagName],\n }\n : {},\n };\n\n // Remove existing formats since tags have default font size and weight\n para.segments.forEach(segment => {\n delete segment.format.fontSize;\n delete segment.format.fontWeight;\n });\n } else if (tagName) {\n delete para.decorator;\n }\n });\n}\n\nfunction getExistingHeadingTag(\n decorator?: ContentModelParagraphDecorator\n): HeadingLevelTags | null {\n const tag = decorator?.tagName || '';\n const level = parseInt(tag.substring(1));\n\n return level >= 1 && level <= 6 ? (tag as HeadingLevelTags) : null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setHeadingLevel.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setHeadingLevel.ts"],"names":[],"mappings":";;AAAA,4FAA2F;AAQ3F,IAAM,eAAe,GAAqC;IACtD,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;CACf,CAAC;AAEF;;;;GAIG;AACH,SAAwB,eAAe,CACnC,MAAyB,EACzB,YAAuC;IAEvC,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,iEAA+B,EAAC,MAAM,EAAE,iBAAiB,EAAE,UAAA,IAAI;QAC3D,IAAM,OAAO,GACT,YAAY,GAAG,CAAC;YACZ,CAAC,CAAE,CAAC,GAAG,GAAG,YAAY,CAA6B;YACnD,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEhD,IAAI,YAAY,GAAG,CAAC,EAAE;YAClB,IAAI,CAAC,SAAS,GAAG;gBACb,OAAO,EAAE,OAAQ;gBACjB,MAAM,EAAE,OAAO;oBACX,CAAC,CAAC;wBACI,UAAU,EAAE,MAAM;wBAClB,QAAQ,EAAE,eAAe,CAAC,OAAO,CAAC;qBACrC;oBACH,CAAC,CAAC,EAAE;aACX,CAAC;YAEF,uEAAuE;YACvE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,OAAO;gBACzB,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;gBAC/B,OAAO,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;YACrC,CAAC,CAAC,CAAC;SACN;aAAM,IAAI,OAAO,EAAE;YAChB,OAAO,IAAI,CAAC,SAAS,CAAC;SACzB;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAhCD,kCAgCC;AAED,SAAS,qBAAqB,CAC1B,SAA0C;IAE1C,IAAM,GAAG,GAAG,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,KAAI,EAAE,CAAC;IACrC,IAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzC,OAAO,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAE,GAAwB,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC","sourcesContent":["import { formatParagraphWithContentModel } from '../utils/formatParagraphWithContentModel';\r\nimport type {\r\n ContentModelParagraphDecorator,\r\n IStandaloneEditor,\r\n} from 'roosterjs-content-model-types';\r\n\r\ntype HeadingLevelTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\r\n\r\nconst HeaderFontSizes: Record<HeadingLevelTags, string> = {\r\n h1: '2em',\r\n h2: '1.5em',\r\n h3: '1.17em',\r\n h4: '1em',\r\n h5: '0.83em',\r\n h6: '0.67em',\r\n};\r\n\r\n/**\r\n * Set heading level of selected paragraphs\r\n * @param editor The editor to set heading level to\r\n * @param headingLevel Level of heading, from 1 to 6. Set to 0 means set it back to a regular paragraph\r\n */\r\nexport default function setHeadingLevel(\r\n editor: IStandaloneEditor,\r\n headingLevel: 0 | 1 | 2 | 3 | 4 | 5 | 6\r\n) {\r\n editor.focus();\r\n\r\n formatParagraphWithContentModel(editor, 'setHeadingLevel', para => {\r\n const tagName =\r\n headingLevel > 0\r\n ? (('h' + headingLevel) as HeadingLevelTags | null)\r\n : getExistingHeadingTag(para.decorator);\r\n\r\n if (headingLevel > 0) {\r\n para.decorator = {\r\n tagName: tagName!,\r\n format: tagName\r\n ? {\r\n fontWeight: 'bold',\r\n fontSize: HeaderFontSizes[tagName],\r\n }\r\n : {},\r\n };\r\n\r\n // Remove existing formats since tags have default font size and weight\r\n para.segments.forEach(segment => {\r\n delete segment.format.fontSize;\r\n delete segment.format.fontWeight;\r\n });\r\n } else if (tagName) {\r\n delete para.decorator;\r\n }\r\n });\r\n}\r\n\r\nfunction getExistingHeadingTag(\r\n decorator?: ContentModelParagraphDecorator\r\n): HeadingLevelTags | null {\r\n const tag = decorator?.tagName || '';\r\n const level = parseInt(tag.substring(1));\r\n\r\n return level >= 1 && level <= 6 ? (tag as HeadingLevelTags) : null;\r\n}\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Indent or outdent to selected paragraphs
|
|
4
|
-
* @param editor The editor to operate on
|
|
5
|
-
* @param indentation Whether indent or outdent
|
|
6
|
-
* @param length The length of pixel to indent/outdent @default 40
|
|
7
|
-
*/
|
|
8
|
-
export default function setIndentation(editor: IStandaloneEditor, indentation: 'indent' | 'outdent', length?: number): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Indent or outdent to selected paragraphs
|
|
4
|
+
* @param editor The editor to operate on
|
|
5
|
+
* @param indentation Whether indent or outdent
|
|
6
|
+
* @param length The length of pixel to indent/outdent @default 40
|
|
7
|
+
*/
|
|
8
|
+
export default function setIndentation(editor: IStandaloneEditor, indentation: 'indent' | 'outdent', length?: number): void;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
4
|
-
var setModelIndentation_1 = require("../../modelApi/block/setModelIndentation");
|
|
5
|
-
/**
|
|
6
|
-
* Indent or outdent to selected paragraphs
|
|
7
|
-
* @param editor The editor to operate on
|
|
8
|
-
* @param indentation Whether indent or outdent
|
|
9
|
-
* @param length The length of pixel to indent/outdent @default 40
|
|
10
|
-
*/
|
|
11
|
-
function setIndentation(editor, indentation, length) {
|
|
12
|
-
editor.focus();
|
|
13
|
-
editor.formatContentModel(function (model, context) {
|
|
14
|
-
var result = (0, setModelIndentation_1.setModelIndentation)(model, indentation, length);
|
|
15
|
-
if (result) {
|
|
16
|
-
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
17
|
-
}
|
|
18
|
-
context.newPendingFormat = 'preserve';
|
|
19
|
-
return result;
|
|
20
|
-
}, {
|
|
21
|
-
apiName: 'setIndentation',
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
exports.default = setIndentation;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
4
|
+
var setModelIndentation_1 = require("../../modelApi/block/setModelIndentation");
|
|
5
|
+
/**
|
|
6
|
+
* Indent or outdent to selected paragraphs
|
|
7
|
+
* @param editor The editor to operate on
|
|
8
|
+
* @param indentation Whether indent or outdent
|
|
9
|
+
* @param length The length of pixel to indent/outdent @default 40
|
|
10
|
+
*/
|
|
11
|
+
function setIndentation(editor, indentation, length) {
|
|
12
|
+
editor.focus();
|
|
13
|
+
editor.formatContentModel(function (model, context) {
|
|
14
|
+
var result = (0, setModelIndentation_1.setModelIndentation)(model, indentation, length);
|
|
15
|
+
if (result) {
|
|
16
|
+
(0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
|
|
17
|
+
}
|
|
18
|
+
context.newPendingFormat = 'preserve';
|
|
19
|
+
return result;
|
|
20
|
+
}, {
|
|
21
|
+
apiName: 'setIndentation',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.default = setIndentation;
|
|
25
25
|
//# sourceMappingURL=setIndentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setIndentation.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setIndentation.ts"],"names":[],"mappings":";;AAAA,2EAAoE;AACpE,gFAA+E;AAG/E;;;;;GAKG;AACH,SAAwB,cAAc,CAClC,MAAyB,EACzB,WAAiC,EACjC,MAAe;IAEf,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,MAAM,GAAG,IAAA,yCAAmB,EAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QAE/D,IAAI,MAAM,EAAE;YACR,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;SAChC;QAED,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAEtC,OAAO,MAAM,CAAC;IAClB,CAAC,EACD;QACI,OAAO,EAAE,gBAAgB;KAC5B,CACJ,CAAC;AACN,CAAC;AAvBD,iCAuBC","sourcesContent":["import { normalizeContentModel } from 'roosterjs-content-model-dom';\nimport { setModelIndentation } from '../../modelApi/block/setModelIndentation';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Indent or outdent to selected paragraphs\n * @param editor The editor to operate on\n * @param indentation Whether indent or outdent\n * @param length The length of pixel to indent/outdent @default 40\n */\nexport default function setIndentation(\n editor: IStandaloneEditor,\n indentation: 'indent' | 'outdent',\n length?: number\n) {\n editor.focus();\n\n editor.formatContentModel(\n (model, context) => {\n const result = setModelIndentation(model, indentation, length);\n\n if (result) {\n normalizeContentModel(model);\n }\n\n context.newPendingFormat = 'preserve';\n\n return result;\n },\n {\n apiName: 'setIndentation',\n }\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setIndentation.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setIndentation.ts"],"names":[],"mappings":";;AAAA,2EAAoE;AACpE,gFAA+E;AAG/E;;;;;GAKG;AACH,SAAwB,cAAc,CAClC,MAAyB,EACzB,WAAiC,EACjC,MAAe;IAEf,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,MAAM,GAAG,IAAA,yCAAmB,EAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QAE/D,IAAI,MAAM,EAAE;YACR,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;SAChC;QAED,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAEtC,OAAO,MAAM,CAAC;IAClB,CAAC,EACD;QACI,OAAO,EAAE,gBAAgB;KAC5B,CACJ,CAAC;AACN,CAAC;AAvBD,iCAuBC","sourcesContent":["import { normalizeContentModel } from 'roosterjs-content-model-dom';\r\nimport { setModelIndentation } from '../../modelApi/block/setModelIndentation';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Indent or outdent to selected paragraphs\r\n * @param editor The editor to operate on\r\n * @param indentation Whether indent or outdent\r\n * @param length The length of pixel to indent/outdent @default 40\r\n */\r\nexport default function setIndentation(\r\n editor: IStandaloneEditor,\r\n indentation: 'indent' | 'outdent',\r\n length?: number\r\n) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n (model, context) => {\r\n const result = setModelIndentation(model, indentation, length);\r\n\r\n if (result) {\r\n normalizeContentModel(model);\r\n }\r\n\r\n context.newPendingFormat = 'preserve';\r\n\r\n return result;\r\n },\r\n {\r\n apiName: 'setIndentation',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Toggles the current block(s) margin properties.
|
|
4
|
-
* null deletes any existing value, undefined is ignored
|
|
5
|
-
* @param editor The editor to operate on
|
|
6
|
-
* @param marginTop value for top margin
|
|
7
|
-
* @param marginBottom value for bottom margin
|
|
8
|
-
*/
|
|
9
|
-
export default function setParagraphMargin(editor: IStandaloneEditor, marginTop?: string | null, marginBottom?: string | null): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Toggles the current block(s) margin properties.
|
|
4
|
+
* null deletes any existing value, undefined is ignored
|
|
5
|
+
* @param editor The editor to operate on
|
|
6
|
+
* @param marginTop value for top margin
|
|
7
|
+
* @param marginBottom value for bottom margin
|
|
8
|
+
*/
|
|
9
|
+
export default function setParagraphMargin(editor: IStandaloneEditor, marginTop?: string | null, marginBottom?: string | null): void;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
4
|
-
var formatParagraphWithContentModel_1 = require("../utils/formatParagraphWithContentModel");
|
|
5
|
-
/**
|
|
6
|
-
* Toggles the current block(s) margin properties.
|
|
7
|
-
* null deletes any existing value, undefined is ignored
|
|
8
|
-
* @param editor The editor to operate on
|
|
9
|
-
* @param marginTop value for top margin
|
|
10
|
-
* @param marginBottom value for bottom margin
|
|
11
|
-
*/
|
|
12
|
-
function setParagraphMargin(editor, marginTop, marginBottom) {
|
|
13
|
-
editor.focus();
|
|
14
|
-
(0, formatParagraphWithContentModel_1.formatParagraphWithContentModel)(editor, 'setParagraphMargin', function (para) {
|
|
15
|
-
if (!para.decorator) {
|
|
16
|
-
para.decorator = (0, roosterjs_content_model_dom_1.createParagraphDecorator)('p');
|
|
17
|
-
}
|
|
18
|
-
if (marginTop) {
|
|
19
|
-
para.format.marginTop = marginTop;
|
|
20
|
-
}
|
|
21
|
-
else if (marginTop === null) {
|
|
22
|
-
delete para.format.marginTop;
|
|
23
|
-
}
|
|
24
|
-
if (marginBottom) {
|
|
25
|
-
para.format.marginBottom = marginBottom;
|
|
26
|
-
}
|
|
27
|
-
else if (marginBottom === null) {
|
|
28
|
-
delete para.format.marginBottom;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
exports.default = setParagraphMargin;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
4
|
+
var formatParagraphWithContentModel_1 = require("../utils/formatParagraphWithContentModel");
|
|
5
|
+
/**
|
|
6
|
+
* Toggles the current block(s) margin properties.
|
|
7
|
+
* null deletes any existing value, undefined is ignored
|
|
8
|
+
* @param editor The editor to operate on
|
|
9
|
+
* @param marginTop value for top margin
|
|
10
|
+
* @param marginBottom value for bottom margin
|
|
11
|
+
*/
|
|
12
|
+
function setParagraphMargin(editor, marginTop, marginBottom) {
|
|
13
|
+
editor.focus();
|
|
14
|
+
(0, formatParagraphWithContentModel_1.formatParagraphWithContentModel)(editor, 'setParagraphMargin', function (para) {
|
|
15
|
+
if (!para.decorator) {
|
|
16
|
+
para.decorator = (0, roosterjs_content_model_dom_1.createParagraphDecorator)('p');
|
|
17
|
+
}
|
|
18
|
+
if (marginTop) {
|
|
19
|
+
para.format.marginTop = marginTop;
|
|
20
|
+
}
|
|
21
|
+
else if (marginTop === null) {
|
|
22
|
+
delete para.format.marginTop;
|
|
23
|
+
}
|
|
24
|
+
if (marginBottom) {
|
|
25
|
+
para.format.marginBottom = marginBottom;
|
|
26
|
+
}
|
|
27
|
+
else if (marginBottom === null) {
|
|
28
|
+
delete para.format.marginBottom;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.default = setParagraphMargin;
|
|
33
33
|
//# sourceMappingURL=setParagraphMargin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setParagraphMargin.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setParagraphMargin.ts"],"names":[],"mappings":";;AAAA,2EAAuE;AACvE,4FAA2F;AAG3F;;;;;;GAMG;AACH,SAAwB,kBAAkB,CACtC,MAAyB,EACzB,SAAyB,EACzB,YAA4B;IAE5B,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,iEAA+B,EAAC,MAAM,EAAE,oBAAoB,EAAE,UAAA,IAAI;QAC9D,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAA,sDAAwB,EAAC,GAAG,CAAC,CAAC;SAClD;QAED,IAAI,SAAS,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;SACrC;aAAM,IAAI,SAAS,KAAK,IAAI,EAAE;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;SAChC;QAED,IAAI,YAAY,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;SAC3C;aAAM,IAAI,YAAY,KAAK,IAAI,EAAE;YAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;SACnC;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAxBD,qCAwBC","sourcesContent":["import { createParagraphDecorator } from 'roosterjs-content-model-dom';\nimport { formatParagraphWithContentModel } from '../utils/formatParagraphWithContentModel';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Toggles the current block(s) margin properties.\n * null deletes any existing value, undefined is ignored\n * @param editor The editor to operate on\n * @param marginTop value for top margin\n * @param marginBottom value for bottom margin\n */\nexport default function setParagraphMargin(\n editor: IStandaloneEditor,\n marginTop?: string | null,\n marginBottom?: string | null\n) {\n editor.focus();\n\n formatParagraphWithContentModel(editor, 'setParagraphMargin', para => {\n if (!para.decorator) {\n para.decorator = createParagraphDecorator('p');\n }\n\n if (marginTop) {\n para.format.marginTop = marginTop;\n } else if (marginTop === null) {\n delete para.format.marginTop;\n }\n\n if (marginBottom) {\n para.format.marginBottom = marginBottom;\n } else if (marginBottom === null) {\n delete para.format.marginBottom;\n }\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setParagraphMargin.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setParagraphMargin.ts"],"names":[],"mappings":";;AAAA,2EAAuE;AACvE,4FAA2F;AAG3F;;;;;;GAMG;AACH,SAAwB,kBAAkB,CACtC,MAAyB,EACzB,SAAyB,EACzB,YAA4B;IAE5B,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,iEAA+B,EAAC,MAAM,EAAE,oBAAoB,EAAE,UAAA,IAAI;QAC9D,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAA,sDAAwB,EAAC,GAAG,CAAC,CAAC;SAClD;QAED,IAAI,SAAS,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;SACrC;aAAM,IAAI,SAAS,KAAK,IAAI,EAAE;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;SAChC;QAED,IAAI,YAAY,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;SAC3C;aAAM,IAAI,YAAY,KAAK,IAAI,EAAE;YAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;SACnC;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAxBD,qCAwBC","sourcesContent":["import { createParagraphDecorator } from 'roosterjs-content-model-dom';\r\nimport { formatParagraphWithContentModel } from '../utils/formatParagraphWithContentModel';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Toggles the current block(s) margin properties.\r\n * null deletes any existing value, undefined is ignored\r\n * @param editor The editor to operate on\r\n * @param marginTop value for top margin\r\n * @param marginBottom value for bottom margin\r\n */\r\nexport default function setParagraphMargin(\r\n editor: IStandaloneEditor,\r\n marginTop?: string | null,\r\n marginBottom?: string | null\r\n) {\r\n editor.focus();\r\n\r\n formatParagraphWithContentModel(editor, 'setParagraphMargin', para => {\r\n if (!para.decorator) {\r\n para.decorator = createParagraphDecorator('p');\r\n }\r\n\r\n if (marginTop) {\r\n para.format.marginTop = marginTop;\r\n } else if (marginTop === null) {\r\n delete para.format.marginTop;\r\n }\r\n\r\n if (marginBottom) {\r\n para.format.marginBottom = marginBottom;\r\n } else if (marginBottom === null) {\r\n delete para.format.marginBottom;\r\n }\r\n });\r\n}\r\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Sets current selected block(s) line-height property and wipes such property from child segments
|
|
4
|
-
* @param editor The editor to operate on
|
|
5
|
-
* @param spacing Unitless/px value to set line height
|
|
6
|
-
*/
|
|
7
|
-
export default function setSpacing(editor: IStandaloneEditor, spacing: number | string): void;
|
|
1
|
+
import type { IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Sets current selected block(s) line-height property and wipes such property from child segments
|
|
4
|
+
* @param editor The editor to operate on
|
|
5
|
+
* @param spacing Unitless/px value to set line height
|
|
6
|
+
*/
|
|
7
|
+
export default function setSpacing(editor: IStandaloneEditor, spacing: number | string): void;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var formatParagraphWithContentModel_1 = require("../utils/formatParagraphWithContentModel");
|
|
4
|
-
/**
|
|
5
|
-
* Sets current selected block(s) line-height property and wipes such property from child segments
|
|
6
|
-
* @param editor The editor to operate on
|
|
7
|
-
* @param spacing Unitless/px value to set line height
|
|
8
|
-
*/
|
|
9
|
-
function setSpacing(editor, spacing) {
|
|
10
|
-
editor.focus();
|
|
11
|
-
(0, formatParagraphWithContentModel_1.formatParagraphWithContentModel)(editor, 'setSpacing', function (paragraph) {
|
|
12
|
-
paragraph.format.lineHeight = spacing.toString();
|
|
13
|
-
paragraph.segments.forEach(function (segment) {
|
|
14
|
-
if (segment.format.lineHeight) {
|
|
15
|
-
delete segment.format.lineHeight;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
exports.default = setSpacing;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var formatParagraphWithContentModel_1 = require("../utils/formatParagraphWithContentModel");
|
|
4
|
+
/**
|
|
5
|
+
* Sets current selected block(s) line-height property and wipes such property from child segments
|
|
6
|
+
* @param editor The editor to operate on
|
|
7
|
+
* @param spacing Unitless/px value to set line height
|
|
8
|
+
*/
|
|
9
|
+
function setSpacing(editor, spacing) {
|
|
10
|
+
editor.focus();
|
|
11
|
+
(0, formatParagraphWithContentModel_1.formatParagraphWithContentModel)(editor, 'setSpacing', function (paragraph) {
|
|
12
|
+
paragraph.format.lineHeight = spacing.toString();
|
|
13
|
+
paragraph.segments.forEach(function (segment) {
|
|
14
|
+
if (segment.format.lineHeight) {
|
|
15
|
+
delete segment.format.lineHeight;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.default = setSpacing;
|
|
21
21
|
//# sourceMappingURL=setSpacing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setSpacing.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setSpacing.ts"],"names":[],"mappings":";;AAAA,4FAA2F;AAG3F;;;;GAIG;AACH,SAAwB,UAAU,CAAC,MAAyB,EAAE,OAAwB;IAClF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,iEAA+B,EAAC,MAAM,EAAE,YAAY,EAAE,UAAA,SAAS;QAC3D,SAAS,CAAC,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACjD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,OAAO;YAC9B,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE;gBAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;aACpC;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAXD,6BAWC","sourcesContent":["import { formatParagraphWithContentModel } from '../utils/formatParagraphWithContentModel';\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Sets current selected block(s) line-height property and wipes such property from child segments\n * @param editor The editor to operate on\n * @param spacing Unitless/px value to set line height\n */\nexport default function setSpacing(editor: IStandaloneEditor, spacing: number | string) {\n editor.focus();\n\n formatParagraphWithContentModel(editor, 'setSpacing', paragraph => {\n paragraph.format.lineHeight = spacing.toString();\n paragraph.segments.forEach(segment => {\n if (segment.format.lineHeight) {\n delete segment.format.lineHeight;\n }\n });\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"setSpacing.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/setSpacing.ts"],"names":[],"mappings":";;AAAA,4FAA2F;AAG3F;;;;GAIG;AACH,SAAwB,UAAU,CAAC,MAAyB,EAAE,OAAwB;IAClF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,iEAA+B,EAAC,MAAM,EAAE,YAAY,EAAE,UAAA,SAAS;QAC3D,SAAS,CAAC,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACjD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAA,OAAO;YAC9B,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE;gBAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;aACpC;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAXD,6BAWC","sourcesContent":["import { formatParagraphWithContentModel } from '../utils/formatParagraphWithContentModel';\r\nimport type { IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Sets current selected block(s) line-height property and wipes such property from child segments\r\n * @param editor The editor to operate on\r\n * @param spacing Unitless/px value to set line height\r\n */\r\nexport default function setSpacing(editor: IStandaloneEditor, spacing: number | string) {\r\n editor.focus();\r\n\r\n formatParagraphWithContentModel(editor, 'setSpacing', paragraph => {\r\n paragraph.format.lineHeight = spacing.toString();\r\n paragraph.segments.forEach(segment => {\r\n if (segment.format.lineHeight) {\r\n delete segment.format.lineHeight;\r\n }\r\n });\r\n });\r\n}\r\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ContentModelFormatContainerFormat, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Toggle BLOCKQUOTE state of selected paragraphs.
|
|
4
|
-
* If any selected paragraph is not under a BLOCKQUOTE, wrap them into a BLOCKQUOTE.
|
|
5
|
-
* Otherwise, unwrap all related BLOCKQUOTEs.
|
|
6
|
-
* @param editor The editor object to toggle BLOCKQUOTE onto
|
|
7
|
-
* @param quoteFormat @optional Block format for the new quote object
|
|
8
|
-
*/
|
|
9
|
-
export default function toggleBlockQuote(editor: IStandaloneEditor, quoteFormat?: ContentModelFormatContainerFormat): void;
|
|
1
|
+
import type { ContentModelFormatContainerFormat, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Toggle BLOCKQUOTE state of selected paragraphs.
|
|
4
|
+
* If any selected paragraph is not under a BLOCKQUOTE, wrap them into a BLOCKQUOTE.
|
|
5
|
+
* Otherwise, unwrap all related BLOCKQUOTEs.
|
|
6
|
+
* @param editor The editor object to toggle BLOCKQUOTE onto
|
|
7
|
+
* @param quoteFormat @optional Block format for the new quote object
|
|
8
|
+
*/
|
|
9
|
+
export default function toggleBlockQuote(editor: IStandaloneEditor, quoteFormat?: ContentModelFormatContainerFormat, quoteFormatRtl?: ContentModelFormatContainerFormat): void;
|
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
var toggleModelBlockQuote_1 = require("../../modelApi/block/toggleModelBlockQuote");
|
|
5
|
-
var
|
|
6
|
-
borderLeft: '3px solid rgb(200, 200, 200)',
|
|
7
|
-
textColor: 'rgb(102, 102, 102)',
|
|
8
|
-
};
|
|
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
|
-
|
|
34
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var toggleModelBlockQuote_1 = require("../../modelApi/block/toggleModelBlockQuote");
|
|
5
|
+
var DefaultQuoteFormatLtr = {
|
|
6
|
+
borderLeft: '3px solid rgb(200, 200, 200)',
|
|
7
|
+
textColor: 'rgb(102, 102, 102)',
|
|
8
|
+
};
|
|
9
|
+
var DefaultQuoteFormatRtl = {
|
|
10
|
+
borderRight: '3px solid rgb(200, 200, 200)',
|
|
11
|
+
textColor: 'rgb(102, 102, 102)',
|
|
12
|
+
};
|
|
13
|
+
var BuildInQuoteFormat = {
|
|
14
|
+
marginTop: '1em',
|
|
15
|
+
marginBottom: '1em',
|
|
16
|
+
marginLeft: '40px',
|
|
17
|
+
marginRight: '40px',
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Toggle BLOCKQUOTE state of selected paragraphs.
|
|
21
|
+
* If any selected paragraph is not under a BLOCKQUOTE, wrap them into a BLOCKQUOTE.
|
|
22
|
+
* Otherwise, unwrap all related BLOCKQUOTEs.
|
|
23
|
+
* @param editor The editor object to toggle BLOCKQUOTE onto
|
|
24
|
+
* @param quoteFormat @optional Block format for the new quote object
|
|
25
|
+
*/
|
|
26
|
+
function toggleBlockQuote(editor, quoteFormat, quoteFormatRtl) {
|
|
27
|
+
var _a;
|
|
28
|
+
var fullQuoteFormatLtr = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, BuildInQuoteFormat), { paddingLeft: '10px' }), (quoteFormat !== null && quoteFormat !== void 0 ? quoteFormat : DefaultQuoteFormatLtr));
|
|
29
|
+
var fullQuoteFormatRtl = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, BuildInQuoteFormat), { paddingRight: '10px', direction: 'rtl' }), ((_a = quoteFormatRtl !== null && quoteFormatRtl !== void 0 ? quoteFormatRtl : quoteFormat) !== null && _a !== void 0 ? _a : DefaultQuoteFormatRtl));
|
|
30
|
+
editor.focus();
|
|
31
|
+
editor.formatContentModel(function (model, context) {
|
|
32
|
+
context.newPendingFormat = 'preserve';
|
|
33
|
+
return (0, toggleModelBlockQuote_1.toggleModelBlockQuote)(model, fullQuoteFormatLtr, fullQuoteFormatRtl);
|
|
34
|
+
}, {
|
|
35
|
+
apiName: 'toggleBlockQuote',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
exports.default = toggleBlockQuote;
|
|
35
39
|
//# sourceMappingURL=toggleBlockQuote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggleBlockQuote.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/toggleBlockQuote.ts"],"names":[],"mappings":";;;AAAA,oFAAmF;AAMnF,IAAM,
|
|
1
|
+
{"version":3,"file":"toggleBlockQuote.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/block/toggleBlockQuote.ts"],"names":[],"mappings":";;;AAAA,oFAAmF;AAMnF,IAAM,qBAAqB,GAAsC;IAC7D,UAAU,EAAE,8BAA8B;IAC1C,SAAS,EAAE,oBAAoB;CAClC,CAAC;AACF,IAAM,qBAAqB,GAAsC;IAC7D,WAAW,EAAE,8BAA8B;IAC3C,SAAS,EAAE,oBAAoB;CAClC,CAAC;AACF,IAAM,kBAAkB,GAAsC;IAC1D,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE,KAAK;IACnB,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,MAAM;CACtB,CAAC;AAEF;;;;;;GAMG;AACH,SAAwB,gBAAgB,CACpC,MAAyB,EACzB,WAA+C,EAC/C,cAAkD;;IAElD,IAAM,kBAAkB,yEACjB,kBAAkB,KACrB,WAAW,EAAE,MAAM,KAChB,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,qBAAqB,CAAC,CAC5C,CAAC;IACF,IAAM,kBAAkB,yEACjB,kBAAkB,KACrB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,KAAK,KACb,CAAC,MAAA,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,WAAW,mCAAI,qBAAqB,CAAC,CAC9D,CAAC;IAEF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAEtC,OAAO,IAAA,6CAAqB,EAAC,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;IAChF,CAAC,EACD;QACI,OAAO,EAAE,kBAAkB;KAC9B,CACJ,CAAC;AACN,CAAC;AA7BD,mCA6BC","sourcesContent":["import { toggleModelBlockQuote } from '../../modelApi/block/toggleModelBlockQuote';\r\nimport type {\r\n ContentModelFormatContainerFormat,\r\n IStandaloneEditor,\r\n} from 'roosterjs-content-model-types';\r\n\r\nconst DefaultQuoteFormatLtr: ContentModelFormatContainerFormat = {\r\n borderLeft: '3px solid rgb(200, 200, 200)',\r\n textColor: 'rgb(102, 102, 102)',\r\n};\r\nconst DefaultQuoteFormatRtl: ContentModelFormatContainerFormat = {\r\n borderRight: '3px solid rgb(200, 200, 200)',\r\n textColor: 'rgb(102, 102, 102)',\r\n};\r\nconst BuildInQuoteFormat: ContentModelFormatContainerFormat = {\r\n marginTop: '1em',\r\n marginBottom: '1em',\r\n marginLeft: '40px',\r\n marginRight: '40px',\r\n};\r\n\r\n/**\r\n * Toggle BLOCKQUOTE state of selected paragraphs.\r\n * If any selected paragraph is not under a BLOCKQUOTE, wrap them into a BLOCKQUOTE.\r\n * Otherwise, unwrap all related BLOCKQUOTEs.\r\n * @param editor The editor object to toggle BLOCKQUOTE onto\r\n * @param quoteFormat @optional Block format for the new quote object\r\n */\r\nexport default function toggleBlockQuote(\r\n editor: IStandaloneEditor,\r\n quoteFormat?: ContentModelFormatContainerFormat,\r\n quoteFormatRtl?: ContentModelFormatContainerFormat\r\n) {\r\n const fullQuoteFormatLtr: ContentModelFormatContainerFormat = {\r\n ...BuildInQuoteFormat,\r\n paddingLeft: '10px',\r\n ...(quoteFormat ?? DefaultQuoteFormatLtr),\r\n };\r\n const fullQuoteFormatRtl: ContentModelFormatContainerFormat = {\r\n ...BuildInQuoteFormat,\r\n paddingRight: '10px',\r\n direction: 'rtl',\r\n ...(quoteFormatRtl ?? quoteFormat ?? DefaultQuoteFormatRtl),\r\n };\r\n\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n (model, context) => {\r\n context.newPendingFormat = 'preserve';\r\n\r\n return toggleModelBlockQuote(model, fullQuoteFormatLtr, fullQuoteFormatRtl);\r\n },\r\n {\r\n apiName: 'toggleBlockQuote',\r\n }\r\n );\r\n}\r\n"]}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type { ContentModelEntity, DOMSelection, InsertEntityPosition, InsertEntityOptions, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Insert an entity into editor
|
|
4
|
-
* @param editor The Content Model editor
|
|
5
|
-
* @param type Type of entity
|
|
6
|
-
* @param isBlock True to insert a block entity, false to insert an inline entity
|
|
7
|
-
* @param position Position of the entity to insert. It can be
|
|
8
|
-
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
9
|
-
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
10
|
-
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
11
|
-
* @param options Move options to insert. See InsertEntityOptions
|
|
12
|
-
*/
|
|
13
|
-
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: boolean, position: 'focus' | 'begin' | 'end' | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|
|
14
|
-
/**
|
|
15
|
-
* Insert a block entity into editor
|
|
16
|
-
* @param editor The Content Model editor
|
|
17
|
-
* @param type Type of entity
|
|
18
|
-
* @param isBlock Must be true for a block entity
|
|
19
|
-
* @param position Position of the entity to insert. It can be
|
|
20
|
-
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
21
|
-
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
22
|
-
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
23
|
-
* @param options Move options to insert. See InsertEntityOptions
|
|
24
|
-
*/
|
|
25
|
-
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: true, position: InsertEntityPosition | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|
|
1
|
+
import type { ContentModelEntity, DOMSelection, InsertEntityPosition, InsertEntityOptions, IStandaloneEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert an entity into editor
|
|
4
|
+
* @param editor The Content Model editor
|
|
5
|
+
* @param type Type of entity
|
|
6
|
+
* @param isBlock True to insert a block entity, false to insert an inline entity
|
|
7
|
+
* @param position Position of the entity to insert. It can be
|
|
8
|
+
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
9
|
+
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
10
|
+
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
11
|
+
* @param options Move options to insert. See InsertEntityOptions
|
|
12
|
+
*/
|
|
13
|
+
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: boolean, position: 'focus' | 'begin' | 'end' | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|
|
14
|
+
/**
|
|
15
|
+
* Insert a block entity into editor
|
|
16
|
+
* @param editor The Content Model editor
|
|
17
|
+
* @param type Type of entity
|
|
18
|
+
* @param isBlock Must be true for a block entity
|
|
19
|
+
* @param position Position of the entity to insert. It can be
|
|
20
|
+
* Value of InsertEntityPosition: see InsertEntityPosition
|
|
21
|
+
* selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to
|
|
22
|
+
* the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)
|
|
23
|
+
* @param options Move options to insert. See InsertEntityOptions
|
|
24
|
+
*/
|
|
25
|
+
export default function insertEntity(editor: IStandaloneEditor, type: string, isBlock: true, position: InsertEntityPosition | DOMSelection, options?: InsertEntityOptions): ContentModelEntity | null;
|