roosterjs-content-model-api 0.20.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/LICENSE +25 -0
- package/README.md +262 -0
- package/lib/index.d.ts +45 -0
- package/lib/index.js +94 -0
- package/lib/index.js.map +1 -0
- package/lib/modelApi/block/setModelAlignment.d.ts +5 -0
- package/lib/modelApi/block/setModelAlignment.js +53 -0
- package/lib/modelApi/block/setModelAlignment.js.map +1 -0
- package/lib/modelApi/block/setModelDirection.d.ts +5 -0
- package/lib/modelApi/block/setModelDirection.js +53 -0
- package/lib/modelApi/block/setModelDirection.js.map +1 -0
- package/lib/modelApi/block/setModelIndentation.d.ts +5 -0
- package/lib/modelApi/block/setModelIndentation.js +48 -0
- package/lib/modelApi/block/setModelIndentation.js.map +1 -0
- package/lib/modelApi/block/toggleModelBlockQuote.d.ts +5 -0
- package/lib/modelApi/block/toggleModelBlockQuote.js +49 -0
- package/lib/modelApi/block/toggleModelBlockQuote.js.map +1 -0
- package/lib/modelApi/common/clearModelFormat.d.ts +5 -0
- package/lib/modelApi/common/clearModelFormat.js +130 -0
- package/lib/modelApi/common/clearModelFormat.js.map +1 -0
- package/lib/modelApi/common/retrieveModelFormatState.d.ts +5 -0
- package/lib/modelApi/common/retrieveModelFormatState.js +172 -0
- package/lib/modelApi/common/retrieveModelFormatState.js.map +1 -0
- package/lib/modelApi/common/wrapBlock.d.ts +16 -0
- package/lib/modelApi/common/wrapBlock.js +45 -0
- package/lib/modelApi/common/wrapBlock.js.map +1 -0
- package/lib/modelApi/domUtils/readFile.d.ts +8 -0
- package/lib/modelApi/domUtils/readFile.js +24 -0
- package/lib/modelApi/domUtils/readFile.js.map +1 -0
- package/lib/modelApi/entity/insertEntityModel.d.ts +5 -0
- package/lib/modelApi/entity/insertEntityModel.js +76 -0
- package/lib/modelApi/entity/insertEntityModel.js.map +1 -0
- package/lib/modelApi/image/applyImageBorderFormat.d.ts +5 -0
- package/lib/modelApi/image/applyImageBorderFormat.js +58 -0
- package/lib/modelApi/image/applyImageBorderFormat.js.map +1 -0
- package/lib/modelApi/list/findListItemsInSameThread.d.ts +5 -0
- package/lib/modelApi/list/findListItemsInSameThread.js +113 -0
- package/lib/modelApi/list/findListItemsInSameThread.js.map +1 -0
- package/lib/modelApi/list/setListType.d.ts +5 -0
- package/lib/modelApi/list/setListType.js +92 -0
- package/lib/modelApi/list/setListType.js.map +1 -0
- package/lib/modelApi/selection/adjustSegmentSelection.d.ts +5 -0
- package/lib/modelApi/selection/adjustSegmentSelection.js +48 -0
- package/lib/modelApi/selection/adjustSegmentSelection.js.map +1 -0
- package/lib/modelApi/selection/adjustWordSelection.d.ts +5 -0
- package/lib/modelApi/selection/adjustWordSelection.js +122 -0
- package/lib/modelApi/selection/adjustWordSelection.js.map +1 -0
- package/lib/modelApi/selection/collapseTableSelection.d.ts +6 -0
- package/lib/modelApi/selection/collapseTableSelection.js +17 -0
- package/lib/modelApi/selection/collapseTableSelection.js.map +1 -0
- package/lib/modelApi/table/alignTable.d.ts +5 -0
- package/lib/modelApi/table/alignTable.js +13 -0
- package/lib/modelApi/table/alignTable.js.map +1 -0
- package/lib/modelApi/table/alignTableCell.d.ts +9 -0
- package/lib/modelApi/table/alignTableCell.js +60 -0
- package/lib/modelApi/table/alignTableCell.js.map +1 -0
- package/lib/modelApi/table/canMergeCells.d.ts +5 -0
- package/lib/modelApi/table/canMergeCells.js +57 -0
- package/lib/modelApi/table/canMergeCells.js.map +1 -0
- package/lib/modelApi/table/createTableStructure.d.ts +5 -0
- package/lib/modelApi/table/createTableStructure.js +20 -0
- package/lib/modelApi/table/createTableStructure.js.map +1 -0
- package/lib/modelApi/table/deleteTable.d.ts +5 -0
- package/lib/modelApi/table/deleteTable.js +12 -0
- package/lib/modelApi/table/deleteTable.js.map +1 -0
- package/lib/modelApi/table/deleteTableColumn.d.ts +5 -0
- package/lib/modelApi/table/deleteTableColumn.js +25 -0
- package/lib/modelApi/table/deleteTableColumn.js.map +1 -0
- package/lib/modelApi/table/deleteTableRow.d.ts +5 -0
- package/lib/modelApi/table/deleteTableRow.js +24 -0
- package/lib/modelApi/table/deleteTableRow.js.map +1 -0
- package/lib/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -0
- package/lib/modelApi/table/ensureFocusableParagraphForTable.js +57 -0
- package/lib/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -0
- package/lib/modelApi/table/getSelectedCells.d.ts +14 -0
- package/lib/modelApi/table/getSelectedCells.js +32 -0
- package/lib/modelApi/table/getSelectedCells.js.map +1 -0
- package/lib/modelApi/table/insertTableColumn.d.ts +5 -0
- package/lib/modelApi/table/insertTableColumn.js +23 -0
- package/lib/modelApi/table/insertTableColumn.js.map +1 -0
- package/lib/modelApi/table/insertTableRow.d.ts +5 -0
- package/lib/modelApi/table/insertTableRow.js +27 -0
- package/lib/modelApi/table/insertTableRow.js.map +1 -0
- package/lib/modelApi/table/mergeTableCells.d.ts +5 -0
- package/lib/modelApi/table/mergeTableCells.js +26 -0
- package/lib/modelApi/table/mergeTableCells.js.map +1 -0
- package/lib/modelApi/table/mergeTableColumn.d.ts +5 -0
- package/lib/modelApi/table/mergeTableColumn.js +38 -0
- package/lib/modelApi/table/mergeTableColumn.js.map +1 -0
- package/lib/modelApi/table/mergeTableRow.d.ts +5 -0
- package/lib/modelApi/table/mergeTableRow.js +39 -0
- package/lib/modelApi/table/mergeTableRow.js.map +1 -0
- package/lib/modelApi/table/splitTableCellHorizontally.d.ts +5 -0
- package/lib/modelApi/table/splitTableCellHorizontally.js +55 -0
- package/lib/modelApi/table/splitTableCellHorizontally.js.map +1 -0
- package/lib/modelApi/table/splitTableCellVertically.d.ts +5 -0
- package/lib/modelApi/table/splitTableCellVertically.js +56 -0
- package/lib/modelApi/table/splitTableCellVertically.js.map +1 -0
- package/lib/publicApi/block/setAlignment.d.ts +7 -0
- package/lib/publicApi/block/setAlignment.js +16 -0
- package/lib/publicApi/block/setAlignment.js.map +1 -0
- package/lib/publicApi/block/setDirection.d.ts +7 -0
- package/lib/publicApi/block/setDirection.js +16 -0
- package/lib/publicApi/block/setDirection.js.map +1 -0
- package/lib/publicApi/block/setHeadingLevel.d.ts +7 -0
- package/lib/publicApi/block/setHeadingLevel.js +50 -0
- package/lib/publicApi/block/setHeadingLevel.js.map +1 -0
- package/lib/publicApi/block/setIndentation.d.ts +8 -0
- package/lib/publicApi/block/setIndentation.js +25 -0
- package/lib/publicApi/block/setIndentation.js.map +1 -0
- package/lib/publicApi/block/setParagraphMargin.d.ts +9 -0
- package/lib/publicApi/block/setParagraphMargin.js +33 -0
- package/lib/publicApi/block/setParagraphMargin.js.map +1 -0
- package/lib/publicApi/block/setSpacing.d.ts +7 -0
- package/lib/publicApi/block/setSpacing.js +21 -0
- package/lib/publicApi/block/setSpacing.js.map +1 -0
- package/lib/publicApi/block/toggleBlockQuote.d.ts +9 -0
- package/lib/publicApi/block/toggleBlockQuote.js +35 -0
- package/lib/publicApi/block/toggleBlockQuote.js.map +1 -0
- package/lib/publicApi/entity/insertEntity.d.ts +25 -0
- package/lib/publicApi/entity/insertEntity.js +41 -0
- package/lib/publicApi/entity/insertEntity.js.map +1 -0
- package/lib/publicApi/format/clearFormat.d.ts +6 -0
- package/lib/publicApi/format/clearFormat.js +23 -0
- package/lib/publicApi/format/clearFormat.js.map +1 -0
- package/lib/publicApi/format/getFormatState.d.ts +26 -0
- package/lib/publicApi/format/getFormatState.js +83 -0
- package/lib/publicApi/format/getFormatState.js.map +1 -0
- package/lib/publicApi/image/adjustImageSelection.d.ts +6 -0
- package/lib/publicApi/image/adjustImageSelection.js +26 -0
- package/lib/publicApi/image/adjustImageSelection.js.map +1 -0
- package/lib/publicApi/image/changeImage.d.ts +7 -0
- package/lib/publicApi/image/changeImage.js +36 -0
- package/lib/publicApi/image/changeImage.js.map +1 -0
- package/lib/publicApi/image/insertImage.d.ts +7 -0
- package/lib/publicApi/image/insertImage.js +38 -0
- package/lib/publicApi/image/insertImage.js.map +1 -0
- package/lib/publicApi/image/setImageAltText.d.ts +8 -0
- package/lib/publicApi/image/setImageAltText.js +17 -0
- package/lib/publicApi/image/setImageAltText.js.map +1 -0
- package/lib/publicApi/image/setImageBorder.d.ts +9 -0
- package/lib/publicApi/image/setImageBorder.js +19 -0
- package/lib/publicApi/image/setImageBorder.js.map +1 -0
- package/lib/publicApi/image/setImageBoxShadow.d.ts +8 -0
- package/lib/publicApi/image/setImageBoxShadow.js +29 -0
- package/lib/publicApi/image/setImageBoxShadow.js.map +1 -0
- package/lib/publicApi/link/adjustLinkSelection.d.ts +6 -0
- package/lib/publicApi/link/adjustLinkSelection.js +34 -0
- package/lib/publicApi/link/adjustLinkSelection.js.map +1 -0
- package/lib/publicApi/link/insertLink.d.ts +15 -0
- package/lib/publicApi/link/insertLink.js +127 -0
- package/lib/publicApi/link/insertLink.js.map +1 -0
- package/lib/publicApi/link/removeLink.d.ts +8 -0
- package/lib/publicApi/link/removeLink.js +32 -0
- package/lib/publicApi/link/removeLink.js.map +1 -0
- package/lib/publicApi/list/setListStartNumber.d.ts +7 -0
- package/lib/publicApi/list/setListStartNumber.js +26 -0
- package/lib/publicApi/list/setListStartNumber.js.map +1 -0
- package/lib/publicApi/list/setListStyle.d.ts +7 -0
- package/lib/publicApi/list/setListStyle.js +33 -0
- package/lib/publicApi/list/setListStyle.js.map +1 -0
- package/lib/publicApi/list/toggleBullet.d.ts +8 -0
- package/lib/publicApi/list/toggleBullet.js +20 -0
- package/lib/publicApi/list/toggleBullet.js.map +1 -0
- package/lib/publicApi/list/toggleNumbering.d.ts +8 -0
- package/lib/publicApi/list/toggleNumbering.js +20 -0
- package/lib/publicApi/list/toggleNumbering.js.map +1 -0
- package/lib/publicApi/segment/applySegmentFormat.d.ts +7 -0
- package/lib/publicApi/segment/applySegmentFormat.js +23 -0
- package/lib/publicApi/segment/applySegmentFormat.js.map +1 -0
- package/lib/publicApi/segment/changeCapitalization.d.ts +10 -0
- package/lib/publicApi/segment/changeCapitalization.js +50 -0
- package/lib/publicApi/segment/changeCapitalization.js.map +1 -0
- package/lib/publicApi/segment/changeFontSize.d.ts +8 -0
- package/lib/publicApi/segment/changeFontSize.js +62 -0
- package/lib/publicApi/segment/changeFontSize.js.map +1 -0
- package/lib/publicApi/segment/setBackgroundColor.d.ts +7 -0
- package/lib/publicApi/segment/setBackgroundColor.js +36 -0
- package/lib/publicApi/segment/setBackgroundColor.js.map +1 -0
- package/lib/publicApi/segment/setFontName.d.ts +7 -0
- package/lib/publicApi/segment/setFontName.js +19 -0
- package/lib/publicApi/segment/setFontName.js.map +1 -0
- package/lib/publicApi/segment/setFontSize.d.ts +12 -0
- package/lib/publicApi/segment/setFontSize.js +34 -0
- package/lib/publicApi/segment/setFontSize.js.map +1 -0
- package/lib/publicApi/segment/setTextColor.d.ts +7 -0
- package/lib/publicApi/segment/setTextColor.js +26 -0
- package/lib/publicApi/segment/setTextColor.js.map +1 -0
- package/lib/publicApi/segment/toggleBold.d.ts +10 -0
- package/lib/publicApi/segment/toggleBold.js +28 -0
- package/lib/publicApi/segment/toggleBold.js.map +1 -0
- package/lib/publicApi/segment/toggleCode.d.ts +6 -0
- package/lib/publicApi/segment/toggleCode.js +28 -0
- package/lib/publicApi/segment/toggleCode.js.map +1 -0
- package/lib/publicApi/segment/toggleItalic.d.ts +6 -0
- package/lib/publicApi/segment/toggleItalic.js +15 -0
- package/lib/publicApi/segment/toggleItalic.js.map +1 -0
- package/lib/publicApi/segment/toggleStrikethrough.d.ts +6 -0
- package/lib/publicApi/segment/toggleStrikethrough.js +15 -0
- package/lib/publicApi/segment/toggleStrikethrough.js.map +1 -0
- package/lib/publicApi/segment/toggleSubscript.d.ts +6 -0
- package/lib/publicApi/segment/toggleSubscript.js +15 -0
- package/lib/publicApi/segment/toggleSubscript.js.map +1 -0
- package/lib/publicApi/segment/toggleSuperscript.d.ts +6 -0
- package/lib/publicApi/segment/toggleSuperscript.js +15 -0
- package/lib/publicApi/segment/toggleSuperscript.js.map +1 -0
- package/lib/publicApi/segment/toggleUnderline.d.ts +6 -0
- package/lib/publicApi/segment/toggleUnderline.js +18 -0
- package/lib/publicApi/segment/toggleUnderline.js.map +1 -0
- package/lib/publicApi/selection/hasSelectionInBlock.d.ts +6 -0
- package/lib/publicApi/selection/hasSelectionInBlock.js +25 -0
- package/lib/publicApi/selection/hasSelectionInBlock.js.map +1 -0
- package/lib/publicApi/selection/hasSelectionInBlockGroup.d.ts +6 -0
- package/lib/publicApi/selection/hasSelectionInBlockGroup.js +18 -0
- package/lib/publicApi/selection/hasSelectionInBlockGroup.js.map +1 -0
- package/lib/publicApi/selection/hasSelectionInSegment.d.ts +6 -0
- package/lib/publicApi/selection/hasSelectionInSegment.js +13 -0
- package/lib/publicApi/selection/hasSelectionInSegment.js.map +1 -0
- package/lib/publicApi/table/applyTableBorderFormat.d.ts +8 -0
- package/lib/publicApi/table/applyTableBorderFormat.js +293 -0
- package/lib/publicApi/table/applyTableBorderFormat.js.map +1 -0
- package/lib/publicApi/table/editTable.d.ts +7 -0
- package/lib/publicApi/table/editTable.js +104 -0
- package/lib/publicApi/table/editTable.js.map +1 -0
- package/lib/publicApi/table/formatTable.d.ts +8 -0
- package/lib/publicApi/table/formatTable.js +38 -0
- package/lib/publicApi/table/formatTable.js.map +1 -0
- package/lib/publicApi/table/insertTable.d.ts +11 -0
- package/lib/publicApi/table/insertTable.js +47 -0
- package/lib/publicApi/table/insertTable.js.map +1 -0
- package/lib/publicApi/table/setTableCellShade.d.ts +7 -0
- package/lib/publicApi/table/setTableCellShade.js +34 -0
- package/lib/publicApi/table/setTableCellShade.js.map +1 -0
- package/lib/publicApi/utils/formatImageWithContentModel.d.ts +5 -0
- package/lib/publicApi/utils/formatImageWithContentModel.js +15 -0
- package/lib/publicApi/utils/formatImageWithContentModel.js.map +1 -0
- package/lib/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -0
- package/lib/publicApi/utils/formatParagraphWithContentModel.js +19 -0
- package/lib/publicApi/utils/formatParagraphWithContentModel.js.map +1 -0
- package/lib/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -0
- package/lib/publicApi/utils/formatSegmentWithContentModel.js +52 -0
- package/lib/publicApi/utils/formatSegmentWithContentModel.js.map +1 -0
- package/lib-amd/index.d.ts +45 -0
- package/lib-amd/index.js +51 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-amd/modelApi/block/setModelAlignment.d.ts +5 -0
- package/lib-amd/modelApi/block/setModelAlignment.js +53 -0
- package/lib-amd/modelApi/block/setModelAlignment.js.map +1 -0
- package/lib-amd/modelApi/block/setModelDirection.d.ts +5 -0
- package/lib-amd/modelApi/block/setModelDirection.js +53 -0
- package/lib-amd/modelApi/block/setModelDirection.js.map +1 -0
- package/lib-amd/modelApi/block/setModelIndentation.d.ts +5 -0
- package/lib-amd/modelApi/block/setModelIndentation.js +48 -0
- package/lib-amd/modelApi/block/setModelIndentation.js.map +1 -0
- package/lib-amd/modelApi/block/toggleModelBlockQuote.d.ts +5 -0
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js +48 -0
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js.map +1 -0
- package/lib-amd/modelApi/common/clearModelFormat.d.ts +5 -0
- package/lib-amd/modelApi/common/clearModelFormat.js +128 -0
- package/lib-amd/modelApi/common/clearModelFormat.js.map +1 -0
- package/lib-amd/modelApi/common/retrieveModelFormatState.d.ts +5 -0
- package/lib-amd/modelApi/common/retrieveModelFormatState.js +172 -0
- package/lib-amd/modelApi/common/retrieveModelFormatState.js.map +1 -0
- package/lib-amd/modelApi/common/wrapBlock.d.ts +16 -0
- package/lib-amd/modelApi/common/wrapBlock.js +45 -0
- package/lib-amd/modelApi/common/wrapBlock.js.map +1 -0
- package/lib-amd/modelApi/domUtils/readFile.d.ts +8 -0
- package/lib-amd/modelApi/domUtils/readFile.js +26 -0
- package/lib-amd/modelApi/domUtils/readFile.js.map +1 -0
- package/lib-amd/modelApi/entity/insertEntityModel.d.ts +5 -0
- package/lib-amd/modelApi/entity/insertEntityModel.js +75 -0
- package/lib-amd/modelApi/entity/insertEntityModel.js.map +1 -0
- package/lib-amd/modelApi/image/applyImageBorderFormat.d.ts +5 -0
- package/lib-amd/modelApi/image/applyImageBorderFormat.js +58 -0
- package/lib-amd/modelApi/image/applyImageBorderFormat.js.map +1 -0
- package/lib-amd/modelApi/list/findListItemsInSameThread.d.ts +5 -0
- package/lib-amd/modelApi/list/findListItemsInSameThread.js +115 -0
- package/lib-amd/modelApi/list/findListItemsInSameThread.js.map +1 -0
- package/lib-amd/modelApi/list/setListType.d.ts +5 -0
- package/lib-amd/modelApi/list/setListType.js +92 -0
- package/lib-amd/modelApi/list/setListType.js.map +1 -0
- package/lib-amd/modelApi/selection/adjustSegmentSelection.d.ts +5 -0
- package/lib-amd/modelApi/selection/adjustSegmentSelection.js +49 -0
- package/lib-amd/modelApi/selection/adjustSegmentSelection.js.map +1 -0
- package/lib-amd/modelApi/selection/adjustWordSelection.d.ts +5 -0
- package/lib-amd/modelApi/selection/adjustWordSelection.js +121 -0
- package/lib-amd/modelApi/selection/adjustWordSelection.js.map +1 -0
- package/lib-amd/modelApi/selection/collapseTableSelection.d.ts +6 -0
- package/lib-amd/modelApi/selection/collapseTableSelection.js +18 -0
- package/lib-amd/modelApi/selection/collapseTableSelection.js.map +1 -0
- package/lib-amd/modelApi/table/alignTable.d.ts +5 -0
- package/lib-amd/modelApi/table/alignTable.js +15 -0
- package/lib-amd/modelApi/table/alignTable.js.map +1 -0
- package/lib-amd/modelApi/table/alignTableCell.d.ts +9 -0
- package/lib-amd/modelApi/table/alignTableCell.js +60 -0
- package/lib-amd/modelApi/table/alignTableCell.js.map +1 -0
- package/lib-amd/modelApi/table/canMergeCells.d.ts +5 -0
- package/lib-amd/modelApi/table/canMergeCells.js +59 -0
- package/lib-amd/modelApi/table/canMergeCells.js.map +1 -0
- package/lib-amd/modelApi/table/createTableStructure.d.ts +5 -0
- package/lib-amd/modelApi/table/createTableStructure.js +21 -0
- package/lib-amd/modelApi/table/createTableStructure.js.map +1 -0
- package/lib-amd/modelApi/table/deleteTable.d.ts +5 -0
- package/lib-amd/modelApi/table/deleteTable.js +14 -0
- package/lib-amd/modelApi/table/deleteTable.js.map +1 -0
- package/lib-amd/modelApi/table/deleteTableColumn.d.ts +5 -0
- package/lib-amd/modelApi/table/deleteTableColumn.js +25 -0
- package/lib-amd/modelApi/table/deleteTableColumn.js.map +1 -0
- package/lib-amd/modelApi/table/deleteTableRow.d.ts +5 -0
- package/lib-amd/modelApi/table/deleteTableRow.js +24 -0
- package/lib-amd/modelApi/table/deleteTableRow.js.map +1 -0
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -0
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js +58 -0
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -0
- package/lib-amd/modelApi/table/getSelectedCells.d.ts +14 -0
- package/lib-amd/modelApi/table/getSelectedCells.js +33 -0
- package/lib-amd/modelApi/table/getSelectedCells.js.map +1 -0
- package/lib-amd/modelApi/table/insertTableColumn.d.ts +5 -0
- package/lib-amd/modelApi/table/insertTableColumn.js +23 -0
- package/lib-amd/modelApi/table/insertTableColumn.js.map +1 -0
- package/lib-amd/modelApi/table/insertTableRow.d.ts +5 -0
- package/lib-amd/modelApi/table/insertTableRow.js +26 -0
- package/lib-amd/modelApi/table/insertTableRow.js.map +1 -0
- package/lib-amd/modelApi/table/mergeTableCells.d.ts +5 -0
- package/lib-amd/modelApi/table/mergeTableCells.js +26 -0
- package/lib-amd/modelApi/table/mergeTableCells.js.map +1 -0
- package/lib-amd/modelApi/table/mergeTableColumn.d.ts +5 -0
- package/lib-amd/modelApi/table/mergeTableColumn.js +38 -0
- package/lib-amd/modelApi/table/mergeTableColumn.js.map +1 -0
- package/lib-amd/modelApi/table/mergeTableRow.d.ts +5 -0
- package/lib-amd/modelApi/table/mergeTableRow.js +39 -0
- package/lib-amd/modelApi/table/mergeTableRow.js.map +1 -0
- package/lib-amd/modelApi/table/splitTableCellHorizontally.d.ts +5 -0
- package/lib-amd/modelApi/table/splitTableCellHorizontally.js +54 -0
- package/lib-amd/modelApi/table/splitTableCellHorizontally.js.map +1 -0
- package/lib-amd/modelApi/table/splitTableCellVertically.d.ts +5 -0
- package/lib-amd/modelApi/table/splitTableCellVertically.js +55 -0
- package/lib-amd/modelApi/table/splitTableCellVertically.js.map +1 -0
- package/lib-amd/publicApi/block/setAlignment.d.ts +7 -0
- package/lib-amd/publicApi/block/setAlignment.js +17 -0
- package/lib-amd/publicApi/block/setAlignment.js.map +1 -0
- package/lib-amd/publicApi/block/setDirection.d.ts +7 -0
- package/lib-amd/publicApi/block/setDirection.js +17 -0
- package/lib-amd/publicApi/block/setDirection.js.map +1 -0
- package/lib-amd/publicApi/block/setHeadingLevel.d.ts +7 -0
- package/lib-amd/publicApi/block/setHeadingLevel.js +51 -0
- package/lib-amd/publicApi/block/setHeadingLevel.js.map +1 -0
- package/lib-amd/publicApi/block/setIndentation.d.ts +8 -0
- package/lib-amd/publicApi/block/setIndentation.js +25 -0
- package/lib-amd/publicApi/block/setIndentation.js.map +1 -0
- package/lib-amd/publicApi/block/setParagraphMargin.d.ts +9 -0
- package/lib-amd/publicApi/block/setParagraphMargin.js +33 -0
- package/lib-amd/publicApi/block/setParagraphMargin.js.map +1 -0
- package/lib-amd/publicApi/block/setSpacing.d.ts +7 -0
- package/lib-amd/publicApi/block/setSpacing.js +22 -0
- package/lib-amd/publicApi/block/setSpacing.js.map +1 -0
- package/lib-amd/publicApi/block/toggleBlockQuote.d.ts +9 -0
- package/lib-amd/publicApi/block/toggleBlockQuote.js +35 -0
- package/lib-amd/publicApi/block/toggleBlockQuote.js.map +1 -0
- package/lib-amd/publicApi/entity/insertEntity.d.ts +25 -0
- package/lib-amd/publicApi/entity/insertEntity.js +40 -0
- package/lib-amd/publicApi/entity/insertEntity.js.map +1 -0
- package/lib-amd/publicApi/format/clearFormat.d.ts +6 -0
- package/lib-amd/publicApi/format/clearFormat.js +23 -0
- package/lib-amd/publicApi/format/clearFormat.js.map +1 -0
- package/lib-amd/publicApi/format/getFormatState.d.ts +26 -0
- package/lib-amd/publicApi/format/getFormatState.js +81 -0
- package/lib-amd/publicApi/format/getFormatState.js.map +1 -0
- package/lib-amd/publicApi/image/adjustImageSelection.d.ts +6 -0
- package/lib-amd/publicApi/image/adjustImageSelection.js +27 -0
- package/lib-amd/publicApi/image/adjustImageSelection.js.map +1 -0
- package/lib-amd/publicApi/image/changeImage.d.ts +7 -0
- package/lib-amd/publicApi/image/changeImage.js +35 -0
- package/lib-amd/publicApi/image/changeImage.js.map +1 -0
- package/lib-amd/publicApi/image/insertImage.d.ts +7 -0
- package/lib-amd/publicApi/image/insertImage.js +37 -0
- package/lib-amd/publicApi/image/insertImage.js.map +1 -0
- package/lib-amd/publicApi/image/setImageAltText.d.ts +8 -0
- package/lib-amd/publicApi/image/setImageAltText.js +18 -0
- package/lib-amd/publicApi/image/setImageAltText.js.map +1 -0
- package/lib-amd/publicApi/image/setImageBorder.d.ts +9 -0
- package/lib-amd/publicApi/image/setImageBorder.js +19 -0
- package/lib-amd/publicApi/image/setImageBorder.js.map +1 -0
- package/lib-amd/publicApi/image/setImageBoxShadow.d.ts +8 -0
- package/lib-amd/publicApi/image/setImageBoxShadow.js +30 -0
- package/lib-amd/publicApi/image/setImageBoxShadow.js.map +1 -0
- package/lib-amd/publicApi/link/adjustLinkSelection.d.ts +6 -0
- package/lib-amd/publicApi/link/adjustLinkSelection.js +33 -0
- package/lib-amd/publicApi/link/adjustLinkSelection.js.map +1 -0
- package/lib-amd/publicApi/link/insertLink.d.ts +15 -0
- package/lib-amd/publicApi/link/insertLink.js +125 -0
- package/lib-amd/publicApi/link/insertLink.js.map +1 -0
- package/lib-amd/publicApi/link/removeLink.d.ts +8 -0
- package/lib-amd/publicApi/link/removeLink.js +32 -0
- package/lib-amd/publicApi/link/removeLink.js.map +1 -0
- package/lib-amd/publicApi/list/setListStartNumber.d.ts +7 -0
- package/lib-amd/publicApi/list/setListStartNumber.js +27 -0
- package/lib-amd/publicApi/list/setListStartNumber.js.map +1 -0
- package/lib-amd/publicApi/list/setListStyle.d.ts +7 -0
- package/lib-amd/publicApi/list/setListStyle.js +33 -0
- package/lib-amd/publicApi/list/setListStyle.js.map +1 -0
- package/lib-amd/publicApi/list/toggleBullet.d.ts +8 -0
- package/lib-amd/publicApi/list/toggleBullet.js +21 -0
- package/lib-amd/publicApi/list/toggleBullet.js.map +1 -0
- package/lib-amd/publicApi/list/toggleNumbering.d.ts +8 -0
- package/lib-amd/publicApi/list/toggleNumbering.js +21 -0
- package/lib-amd/publicApi/list/toggleNumbering.js.map +1 -0
- package/lib-amd/publicApi/segment/applySegmentFormat.d.ts +7 -0
- package/lib-amd/publicApi/segment/applySegmentFormat.js +24 -0
- package/lib-amd/publicApi/segment/applySegmentFormat.js.map +1 -0
- package/lib-amd/publicApi/segment/changeCapitalization.d.ts +10 -0
- package/lib-amd/publicApi/segment/changeCapitalization.js +51 -0
- package/lib-amd/publicApi/segment/changeCapitalization.js.map +1 -0
- package/lib-amd/publicApi/segment/changeFontSize.d.ts +8 -0
- package/lib-amd/publicApi/segment/changeFontSize.js +61 -0
- package/lib-amd/publicApi/segment/changeFontSize.js.map +1 -0
- package/lib-amd/publicApi/segment/setBackgroundColor.d.ts +7 -0
- package/lib-amd/publicApi/segment/setBackgroundColor.js +35 -0
- package/lib-amd/publicApi/segment/setBackgroundColor.js.map +1 -0
- package/lib-amd/publicApi/segment/setFontName.d.ts +7 -0
- package/lib-amd/publicApi/segment/setFontName.js +20 -0
- package/lib-amd/publicApi/segment/setFontName.js.map +1 -0
- package/lib-amd/publicApi/segment/setFontSize.d.ts +12 -0
- package/lib-amd/publicApi/segment/setFontSize.js +35 -0
- package/lib-amd/publicApi/segment/setFontSize.js.map +1 -0
- package/lib-amd/publicApi/segment/setTextColor.d.ts +7 -0
- package/lib-amd/publicApi/segment/setTextColor.js +27 -0
- package/lib-amd/publicApi/segment/setTextColor.js.map +1 -0
- package/lib-amd/publicApi/segment/toggleBold.d.ts +10 -0
- package/lib-amd/publicApi/segment/toggleBold.js +29 -0
- package/lib-amd/publicApi/segment/toggleBold.js.map +1 -0
- package/lib-amd/publicApi/segment/toggleCode.d.ts +6 -0
- package/lib-amd/publicApi/segment/toggleCode.js +28 -0
- package/lib-amd/publicApi/segment/toggleCode.js.map +1 -0
- package/lib-amd/publicApi/segment/toggleItalic.d.ts +6 -0
- package/lib-amd/publicApi/segment/toggleItalic.js +16 -0
- package/lib-amd/publicApi/segment/toggleItalic.js.map +1 -0
- package/lib-amd/publicApi/segment/toggleStrikethrough.d.ts +6 -0
- package/lib-amd/publicApi/segment/toggleStrikethrough.js +16 -0
- package/lib-amd/publicApi/segment/toggleStrikethrough.js.map +1 -0
- package/lib-amd/publicApi/segment/toggleSubscript.d.ts +6 -0
- package/lib-amd/publicApi/segment/toggleSubscript.js +16 -0
- package/lib-amd/publicApi/segment/toggleSubscript.js.map +1 -0
- package/lib-amd/publicApi/segment/toggleSuperscript.d.ts +6 -0
- package/lib-amd/publicApi/segment/toggleSuperscript.js +16 -0
- package/lib-amd/publicApi/segment/toggleSuperscript.js.map +1 -0
- package/lib-amd/publicApi/segment/toggleUnderline.d.ts +6 -0
- package/lib-amd/publicApi/segment/toggleUnderline.js +19 -0
- package/lib-amd/publicApi/segment/toggleUnderline.js.map +1 -0
- package/lib-amd/publicApi/selection/hasSelectionInBlock.d.ts +6 -0
- package/lib-amd/publicApi/selection/hasSelectionInBlock.js +25 -0
- package/lib-amd/publicApi/selection/hasSelectionInBlock.js.map +1 -0
- package/lib-amd/publicApi/selection/hasSelectionInBlockGroup.d.ts +6 -0
- package/lib-amd/publicApi/selection/hasSelectionInBlockGroup.js +19 -0
- package/lib-amd/publicApi/selection/hasSelectionInBlockGroup.js.map +1 -0
- package/lib-amd/publicApi/selection/hasSelectionInSegment.d.ts +6 -0
- package/lib-amd/publicApi/selection/hasSelectionInSegment.js +14 -0
- package/lib-amd/publicApi/selection/hasSelectionInSegment.js.map +1 -0
- package/lib-amd/publicApi/table/applyTableBorderFormat.d.ts +8 -0
- package/lib-amd/publicApi/table/applyTableBorderFormat.js +291 -0
- package/lib-amd/publicApi/table/applyTableBorderFormat.js.map +1 -0
- package/lib-amd/publicApi/table/editTable.d.ts +7 -0
- package/lib-amd/publicApi/table/editTable.js +89 -0
- package/lib-amd/publicApi/table/editTable.js.map +1 -0
- package/lib-amd/publicApi/table/formatTable.d.ts +8 -0
- package/lib-amd/publicApi/table/formatTable.js +38 -0
- package/lib-amd/publicApi/table/formatTable.js.map +1 -0
- package/lib-amd/publicApi/table/insertTable.d.ts +11 -0
- package/lib-amd/publicApi/table/insertTable.js +46 -0
- package/lib-amd/publicApi/table/insertTable.js.map +1 -0
- package/lib-amd/publicApi/table/setTableCellShade.d.ts +7 -0
- package/lib-amd/publicApi/table/setTableCellShade.js +33 -0
- package/lib-amd/publicApi/table/setTableCellShade.js.map +1 -0
- package/lib-amd/publicApi/utils/formatImageWithContentModel.d.ts +5 -0
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js +16 -0
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js.map +1 -0
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -0
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js +20 -0
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js.map +1 -0
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -0
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js +51 -0
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js.map +1 -0
- package/lib-mjs/index.d.ts +45 -0
- package/lib-mjs/index.js +46 -0
- package/lib-mjs/index.js.map +1 -0
- package/lib-mjs/modelApi/block/setModelAlignment.d.ts +5 -0
- package/lib-mjs/modelApi/block/setModelAlignment.js +49 -0
- package/lib-mjs/modelApi/block/setModelAlignment.js.map +1 -0
- package/lib-mjs/modelApi/block/setModelDirection.d.ts +5 -0
- package/lib-mjs/modelApi/block/setModelDirection.js +49 -0
- package/lib-mjs/modelApi/block/setModelDirection.js.map +1 -0
- package/lib-mjs/modelApi/block/setModelIndentation.d.ts +5 -0
- package/lib-mjs/modelApi/block/setModelIndentation.js +44 -0
- package/lib-mjs/modelApi/block/setModelIndentation.js.map +1 -0
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.d.ts +5 -0
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js +45 -0
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js.map +1 -0
- package/lib-mjs/modelApi/common/clearModelFormat.d.ts +5 -0
- package/lib-mjs/modelApi/common/clearModelFormat.js +126 -0
- package/lib-mjs/modelApi/common/clearModelFormat.js.map +1 -0
- package/lib-mjs/modelApi/common/retrieveModelFormatState.d.ts +5 -0
- package/lib-mjs/modelApi/common/retrieveModelFormatState.js +168 -0
- package/lib-mjs/modelApi/common/retrieveModelFormatState.js.map +1 -0
- package/lib-mjs/modelApi/common/wrapBlock.d.ts +16 -0
- package/lib-mjs/modelApi/common/wrapBlock.js +40 -0
- package/lib-mjs/modelApi/common/wrapBlock.js.map +1 -0
- package/lib-mjs/modelApi/domUtils/readFile.d.ts +8 -0
- package/lib-mjs/modelApi/domUtils/readFile.js +20 -0
- package/lib-mjs/modelApi/domUtils/readFile.js.map +1 -0
- package/lib-mjs/modelApi/entity/insertEntityModel.d.ts +5 -0
- package/lib-mjs/modelApi/entity/insertEntityModel.js +72 -0
- package/lib-mjs/modelApi/entity/insertEntityModel.js.map +1 -0
- package/lib-mjs/modelApi/image/applyImageBorderFormat.d.ts +5 -0
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js +55 -0
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js.map +1 -0
- package/lib-mjs/modelApi/list/findListItemsInSameThread.d.ts +5 -0
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js +109 -0
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js.map +1 -0
- package/lib-mjs/modelApi/list/setListType.d.ts +5 -0
- package/lib-mjs/modelApi/list/setListType.js +88 -0
- package/lib-mjs/modelApi/list/setListType.js.map +1 -0
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.d.ts +5 -0
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.js +44 -0
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.js.map +1 -0
- package/lib-mjs/modelApi/selection/adjustWordSelection.d.ts +5 -0
- package/lib-mjs/modelApi/selection/adjustWordSelection.js +118 -0
- package/lib-mjs/modelApi/selection/adjustWordSelection.js.map +1 -0
- package/lib-mjs/modelApi/selection/collapseTableSelection.d.ts +6 -0
- package/lib-mjs/modelApi/selection/collapseTableSelection.js +13 -0
- package/lib-mjs/modelApi/selection/collapseTableSelection.js.map +1 -0
- package/lib-mjs/modelApi/table/alignTable.d.ts +5 -0
- package/lib-mjs/modelApi/table/alignTable.js +9 -0
- package/lib-mjs/modelApi/table/alignTable.js.map +1 -0
- package/lib-mjs/modelApi/table/alignTableCell.d.ts +9 -0
- package/lib-mjs/modelApi/table/alignTableCell.js +55 -0
- package/lib-mjs/modelApi/table/alignTableCell.js.map +1 -0
- package/lib-mjs/modelApi/table/canMergeCells.d.ts +5 -0
- package/lib-mjs/modelApi/table/canMergeCells.js +53 -0
- package/lib-mjs/modelApi/table/canMergeCells.js.map +1 -0
- package/lib-mjs/modelApi/table/createTableStructure.d.ts +5 -0
- package/lib-mjs/modelApi/table/createTableStructure.js +16 -0
- package/lib-mjs/modelApi/table/createTableStructure.js.map +1 -0
- package/lib-mjs/modelApi/table/deleteTable.d.ts +5 -0
- package/lib-mjs/modelApi/table/deleteTable.js +8 -0
- package/lib-mjs/modelApi/table/deleteTable.js.map +1 -0
- package/lib-mjs/modelApi/table/deleteTableColumn.d.ts +5 -0
- package/lib-mjs/modelApi/table/deleteTableColumn.js +21 -0
- package/lib-mjs/modelApi/table/deleteTableColumn.js.map +1 -0
- package/lib-mjs/modelApi/table/deleteTableRow.d.ts +5 -0
- package/lib-mjs/modelApi/table/deleteTableRow.js +20 -0
- package/lib-mjs/modelApi/table/deleteTableRow.js.map +1 -0
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -0
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js +53 -0
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -0
- package/lib-mjs/modelApi/table/getSelectedCells.d.ts +14 -0
- package/lib-mjs/modelApi/table/getSelectedCells.js +28 -0
- package/lib-mjs/modelApi/table/getSelectedCells.js.map +1 -0
- package/lib-mjs/modelApi/table/insertTableColumn.d.ts +5 -0
- package/lib-mjs/modelApi/table/insertTableColumn.js +19 -0
- package/lib-mjs/modelApi/table/insertTableColumn.js.map +1 -0
- package/lib-mjs/modelApi/table/insertTableRow.d.ts +5 -0
- package/lib-mjs/modelApi/table/insertTableRow.js +23 -0
- package/lib-mjs/modelApi/table/insertTableRow.js.map +1 -0
- package/lib-mjs/modelApi/table/mergeTableCells.d.ts +5 -0
- package/lib-mjs/modelApi/table/mergeTableCells.js +22 -0
- package/lib-mjs/modelApi/table/mergeTableCells.js.map +1 -0
- package/lib-mjs/modelApi/table/mergeTableColumn.d.ts +5 -0
- package/lib-mjs/modelApi/table/mergeTableColumn.js +34 -0
- package/lib-mjs/modelApi/table/mergeTableColumn.js.map +1 -0
- package/lib-mjs/modelApi/table/mergeTableRow.d.ts +5 -0
- package/lib-mjs/modelApi/table/mergeTableRow.js +35 -0
- package/lib-mjs/modelApi/table/mergeTableRow.js.map +1 -0
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.d.ts +5 -0
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.js +51 -0
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.js.map +1 -0
- package/lib-mjs/modelApi/table/splitTableCellVertically.d.ts +5 -0
- package/lib-mjs/modelApi/table/splitTableCellVertically.js +52 -0
- package/lib-mjs/modelApi/table/splitTableCellVertically.js.map +1 -0
- package/lib-mjs/publicApi/block/setAlignment.d.ts +7 -0
- package/lib-mjs/publicApi/block/setAlignment.js +13 -0
- package/lib-mjs/publicApi/block/setAlignment.js.map +1 -0
- package/lib-mjs/publicApi/block/setDirection.d.ts +7 -0
- package/lib-mjs/publicApi/block/setDirection.js +13 -0
- package/lib-mjs/publicApi/block/setDirection.js.map +1 -0
- package/lib-mjs/publicApi/block/setHeadingLevel.d.ts +7 -0
- package/lib-mjs/publicApi/block/setHeadingLevel.js +47 -0
- package/lib-mjs/publicApi/block/setHeadingLevel.js.map +1 -0
- package/lib-mjs/publicApi/block/setIndentation.d.ts +8 -0
- package/lib-mjs/publicApi/block/setIndentation.js +22 -0
- package/lib-mjs/publicApi/block/setIndentation.js.map +1 -0
- package/lib-mjs/publicApi/block/setParagraphMargin.d.ts +9 -0
- package/lib-mjs/publicApi/block/setParagraphMargin.js +30 -0
- package/lib-mjs/publicApi/block/setParagraphMargin.js.map +1 -0
- package/lib-mjs/publicApi/block/setSpacing.d.ts +7 -0
- package/lib-mjs/publicApi/block/setSpacing.js +18 -0
- package/lib-mjs/publicApi/block/setSpacing.js.map +1 -0
- package/lib-mjs/publicApi/block/toggleBlockQuote.d.ts +9 -0
- package/lib-mjs/publicApi/block/toggleBlockQuote.js +32 -0
- package/lib-mjs/publicApi/block/toggleBlockQuote.js.map +1 -0
- package/lib-mjs/publicApi/entity/insertEntity.d.ts +25 -0
- package/lib-mjs/publicApi/entity/insertEntity.js +38 -0
- package/lib-mjs/publicApi/entity/insertEntity.js.map +1 -0
- package/lib-mjs/publicApi/format/clearFormat.d.ts +6 -0
- package/lib-mjs/publicApi/format/clearFormat.js +20 -0
- package/lib-mjs/publicApi/format/clearFormat.js.map +1 -0
- package/lib-mjs/publicApi/format/getFormatState.d.ts +26 -0
- package/lib-mjs/publicApi/format/getFormatState.js +78 -0
- package/lib-mjs/publicApi/format/getFormatState.js.map +1 -0
- package/lib-mjs/publicApi/image/adjustImageSelection.d.ts +6 -0
- package/lib-mjs/publicApi/image/adjustImageSelection.js +23 -0
- package/lib-mjs/publicApi/image/adjustImageSelection.js.map +1 -0
- package/lib-mjs/publicApi/image/changeImage.d.ts +7 -0
- package/lib-mjs/publicApi/image/changeImage.js +33 -0
- package/lib-mjs/publicApi/image/changeImage.js.map +1 -0
- package/lib-mjs/publicApi/image/insertImage.d.ts +7 -0
- package/lib-mjs/publicApi/image/insertImage.js +35 -0
- package/lib-mjs/publicApi/image/insertImage.js.map +1 -0
- package/lib-mjs/publicApi/image/setImageAltText.d.ts +8 -0
- package/lib-mjs/publicApi/image/setImageAltText.js +14 -0
- package/lib-mjs/publicApi/image/setImageAltText.js.map +1 -0
- package/lib-mjs/publicApi/image/setImageBorder.d.ts +9 -0
- package/lib-mjs/publicApi/image/setImageBorder.js +16 -0
- package/lib-mjs/publicApi/image/setImageBorder.js.map +1 -0
- package/lib-mjs/publicApi/image/setImageBoxShadow.d.ts +8 -0
- package/lib-mjs/publicApi/image/setImageBoxShadow.js +26 -0
- package/lib-mjs/publicApi/image/setImageBoxShadow.js.map +1 -0
- package/lib-mjs/publicApi/link/adjustLinkSelection.d.ts +6 -0
- package/lib-mjs/publicApi/link/adjustLinkSelection.js +31 -0
- package/lib-mjs/publicApi/link/adjustLinkSelection.js.map +1 -0
- package/lib-mjs/publicApi/link/insertLink.d.ts +15 -0
- package/lib-mjs/publicApi/link/insertLink.js +124 -0
- package/lib-mjs/publicApi/link/insertLink.js.map +1 -0
- package/lib-mjs/publicApi/link/removeLink.d.ts +8 -0
- package/lib-mjs/publicApi/link/removeLink.js +29 -0
- package/lib-mjs/publicApi/link/removeLink.js.map +1 -0
- package/lib-mjs/publicApi/list/setListStartNumber.d.ts +7 -0
- package/lib-mjs/publicApi/list/setListStartNumber.js +23 -0
- package/lib-mjs/publicApi/list/setListStartNumber.js.map +1 -0
- package/lib-mjs/publicApi/list/setListStyle.d.ts +7 -0
- package/lib-mjs/publicApi/list/setListStyle.js +30 -0
- package/lib-mjs/publicApi/list/setListStyle.js.map +1 -0
- package/lib-mjs/publicApi/list/toggleBullet.d.ts +8 -0
- package/lib-mjs/publicApi/list/toggleBullet.js +17 -0
- package/lib-mjs/publicApi/list/toggleBullet.js.map +1 -0
- package/lib-mjs/publicApi/list/toggleNumbering.d.ts +8 -0
- package/lib-mjs/publicApi/list/toggleNumbering.js +17 -0
- package/lib-mjs/publicApi/list/toggleNumbering.js.map +1 -0
- package/lib-mjs/publicApi/segment/applySegmentFormat.d.ts +7 -0
- package/lib-mjs/publicApi/segment/applySegmentFormat.js +20 -0
- package/lib-mjs/publicApi/segment/applySegmentFormat.js.map +1 -0
- package/lib-mjs/publicApi/segment/changeCapitalization.d.ts +10 -0
- package/lib-mjs/publicApi/segment/changeCapitalization.js +47 -0
- package/lib-mjs/publicApi/segment/changeCapitalization.js.map +1 -0
- package/lib-mjs/publicApi/segment/changeFontSize.d.ts +8 -0
- package/lib-mjs/publicApi/segment/changeFontSize.js +59 -0
- package/lib-mjs/publicApi/segment/changeFontSize.js.map +1 -0
- package/lib-mjs/publicApi/segment/setBackgroundColor.d.ts +7 -0
- package/lib-mjs/publicApi/segment/setBackgroundColor.js +33 -0
- package/lib-mjs/publicApi/segment/setBackgroundColor.js.map +1 -0
- package/lib-mjs/publicApi/segment/setFontName.d.ts +7 -0
- package/lib-mjs/publicApi/segment/setFontName.js +16 -0
- package/lib-mjs/publicApi/segment/setFontName.js.map +1 -0
- package/lib-mjs/publicApi/segment/setFontSize.d.ts +12 -0
- package/lib-mjs/publicApi/segment/setFontSize.js +29 -0
- package/lib-mjs/publicApi/segment/setFontSize.js.map +1 -0
- package/lib-mjs/publicApi/segment/setTextColor.d.ts +7 -0
- package/lib-mjs/publicApi/segment/setTextColor.js +23 -0
- package/lib-mjs/publicApi/segment/setTextColor.js.map +1 -0
- package/lib-mjs/publicApi/segment/toggleBold.d.ts +10 -0
- package/lib-mjs/publicApi/segment/toggleBold.js +23 -0
- package/lib-mjs/publicApi/segment/toggleBold.js.map +1 -0
- package/lib-mjs/publicApi/segment/toggleCode.d.ts +6 -0
- package/lib-mjs/publicApi/segment/toggleCode.js +25 -0
- package/lib-mjs/publicApi/segment/toggleCode.js.map +1 -0
- package/lib-mjs/publicApi/segment/toggleItalic.d.ts +6 -0
- package/lib-mjs/publicApi/segment/toggleItalic.js +12 -0
- package/lib-mjs/publicApi/segment/toggleItalic.js.map +1 -0
- package/lib-mjs/publicApi/segment/toggleStrikethrough.d.ts +6 -0
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js +12 -0
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js.map +1 -0
- package/lib-mjs/publicApi/segment/toggleSubscript.d.ts +6 -0
- package/lib-mjs/publicApi/segment/toggleSubscript.js +12 -0
- package/lib-mjs/publicApi/segment/toggleSubscript.js.map +1 -0
- package/lib-mjs/publicApi/segment/toggleSuperscript.d.ts +6 -0
- package/lib-mjs/publicApi/segment/toggleSuperscript.js +12 -0
- package/lib-mjs/publicApi/segment/toggleSuperscript.js.map +1 -0
- package/lib-mjs/publicApi/segment/toggleUnderline.d.ts +6 -0
- package/lib-mjs/publicApi/segment/toggleUnderline.js +15 -0
- package/lib-mjs/publicApi/segment/toggleUnderline.js.map +1 -0
- package/lib-mjs/publicApi/selection/hasSelectionInBlock.d.ts +6 -0
- package/lib-mjs/publicApi/selection/hasSelectionInBlock.js +22 -0
- package/lib-mjs/publicApi/selection/hasSelectionInBlock.js.map +1 -0
- package/lib-mjs/publicApi/selection/hasSelectionInBlockGroup.d.ts +6 -0
- package/lib-mjs/publicApi/selection/hasSelectionInBlockGroup.js +15 -0
- package/lib-mjs/publicApi/selection/hasSelectionInBlockGroup.js.map +1 -0
- package/lib-mjs/publicApi/selection/hasSelectionInSegment.d.ts +6 -0
- package/lib-mjs/publicApi/selection/hasSelectionInSegment.js +10 -0
- package/lib-mjs/publicApi/selection/hasSelectionInSegment.js.map +1 -0
- package/lib-mjs/publicApi/table/applyTableBorderFormat.d.ts +8 -0
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js +290 -0
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js.map +1 -0
- package/lib-mjs/publicApi/table/editTable.d.ts +7 -0
- package/lib-mjs/publicApi/table/editTable.js +101 -0
- package/lib-mjs/publicApi/table/editTable.js.map +1 -0
- package/lib-mjs/publicApi/table/formatTable.d.ts +8 -0
- package/lib-mjs/publicApi/table/formatTable.js +35 -0
- package/lib-mjs/publicApi/table/formatTable.js.map +1 -0
- package/lib-mjs/publicApi/table/insertTable.d.ts +11 -0
- package/lib-mjs/publicApi/table/insertTable.js +44 -0
- package/lib-mjs/publicApi/table/insertTable.js.map +1 -0
- package/lib-mjs/publicApi/table/setTableCellShade.d.ts +7 -0
- package/lib-mjs/publicApi/table/setTableCellShade.js +31 -0
- package/lib-mjs/publicApi/table/setTableCellShade.js.map +1 -0
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.d.ts +5 -0
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js +12 -0
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js.map +1 -0
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -0
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js +15 -0
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js.map +1 -0
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -0
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js +48 -0
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js.map +1 -0
- package/package.json +21 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
RoosterJS
|
|
2
|
+
Copyright (c) Microsoft Corporation
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE
|
package/README.md
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
[](https://github.com/microsoft/roosterjs/actions/workflows/build-and-deploy.yml)
|
|
2
|
+
|
|
3
|
+
# Rooster
|
|
4
|
+
|
|
5
|
+
Rooster is a framework-independent JavaScript rich-text editor neatly nested
|
|
6
|
+
inside one HTML `<div>` element. Editing operations performed by end users are
|
|
7
|
+
handled in simple ways to generate the final HTML.
|
|
8
|
+
|
|
9
|
+
To view the sample site, please click the link below:
|
|
10
|
+
|
|
11
|
+
[RoosterJs Sample Site](https://microsoft.github.io/roosterjs/index.html).
|
|
12
|
+
|
|
13
|
+
## Upgrade from RoosterJs 7.\*
|
|
14
|
+
|
|
15
|
+
Please see [here](https://github.com/microsoft/roosterjs/wiki/RoosterJs-8).
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
### Packages
|
|
20
|
+
|
|
21
|
+
Rooster contains 6 basic packages.
|
|
22
|
+
|
|
23
|
+
1. [roosterjs](https://microsoft.github.io/roosterjs/docs/modules/roosterjs.html):
|
|
24
|
+
A facade of all Rooster code for those who want a quick start. Use the
|
|
25
|
+
`createEditor()` function in roosterjs to create an editor with default
|
|
26
|
+
configurations.
|
|
27
|
+
|
|
28
|
+
2. [roosterjs-editor-core](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_core.html):
|
|
29
|
+
Defines the core editor and plugin infrastructure. Use `roosterjs-editor-core`
|
|
30
|
+
instead of `roosterjs` to build and customize your own editor.
|
|
31
|
+
|
|
32
|
+
3. [roosterjs-editor-api](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_api.html):
|
|
33
|
+
Defines APIs for editor operations. Use these APIs to modify content and
|
|
34
|
+
formatting in the editor you built using `roosterjs-editor-core`.
|
|
35
|
+
|
|
36
|
+
4. [roosterjs-editor-dom](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_dom.html):
|
|
37
|
+
Defines APIs for DOM operations. Use `roosterjs-editor-api` instead unless
|
|
38
|
+
you want to access DOM API directly.
|
|
39
|
+
|
|
40
|
+
5. [roosterjs-editor-plugins](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_plugins.html):
|
|
41
|
+
Defines basic plugins for common features. Examples: making hyperlinks,
|
|
42
|
+
pasting HTML content, inserting inline images.
|
|
43
|
+
|
|
44
|
+
6. [roosterjs-editor-types](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_types.html):
|
|
45
|
+
Defines public interfaces and enumerations.
|
|
46
|
+
|
|
47
|
+
There are also some extension packages to provide additional functionalities.
|
|
48
|
+
|
|
49
|
+
1. [roosterjs-color-utils](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_color_utils.html):
|
|
50
|
+
Provide color transformation utility to make editor work under dark mode.
|
|
51
|
+
|
|
52
|
+
2. [roosterjs-react](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_react.html):
|
|
53
|
+
Provide a React wrapper of roosterjs so it can be easily used with React.
|
|
54
|
+
|
|
55
|
+
3. [roosterjs-editor-types-compatible](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_types_compatible.html):
|
|
56
|
+
Provide types that are compatible with isolatedModules mode. When using isolatedModules mode,
|
|
57
|
+
"const enum" will not work correctly, this package provides enums with prefix "Compatible" in
|
|
58
|
+
their names and they have the same value with const enums in roosterjs-editor-types package
|
|
59
|
+
|
|
60
|
+
### APIs
|
|
61
|
+
|
|
62
|
+
Rooster provides DOM level APIs (in `roosterjs-editor-dom`), core APIs (in `roosterjs-editor-core`), and formatting APIs
|
|
63
|
+
(in `roosterjs-editor-api`) to perform editing operations.
|
|
64
|
+
|
|
65
|
+
`roosterjs-editor-dom` provides several levels of DOM operations:
|
|
66
|
+
|
|
67
|
+
- Perform basic DOM operations such as `wrap()`, `unwrap()`, ...
|
|
68
|
+
- Wrap a given DOM node with `InlineElement` or `BlockElement` and perform
|
|
69
|
+
operations with DOM Walker API.
|
|
70
|
+
- Perform DOM operations on a given scope using scopers.
|
|
71
|
+
- Travel among `InlineElements` and `BlockElements` with scope using
|
|
72
|
+
ContentTraverser API.
|
|
73
|
+
|
|
74
|
+
`roosterjs-editor-core` provides APIs for editor core. Editor class will call such
|
|
75
|
+
APIs to perform basic editor operations. These APIs are overridable by specifying
|
|
76
|
+
API overrides in Editor options when creating the editor.
|
|
77
|
+
|
|
78
|
+
`roosterjs-editor-api` provides APIs for scenario-based operations triggered by
|
|
79
|
+
user interaction.
|
|
80
|
+
|
|
81
|
+
## Plugins
|
|
82
|
+
|
|
83
|
+
Rooster supports plugins. You can use built-in plugins or build your own.
|
|
84
|
+
Plugins call APIs to communicate with the editor. When an operation is
|
|
85
|
+
performed by the user or when content is changed by code, the editor will
|
|
86
|
+
trigger events for the plugins to handle.
|
|
87
|
+
|
|
88
|
+
Here's a sample plugin which will show a dialog containing "Hello Rooster" when
|
|
89
|
+
an "a" is typed in the editor:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
class HelloRooster implements EditorPlugin {
|
|
93
|
+
getName() {
|
|
94
|
+
return 'HelloRooster';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
initialize(editor: IEditor) {}
|
|
98
|
+
|
|
99
|
+
dispose() {}
|
|
100
|
+
|
|
101
|
+
onPluginEvent(e: PluginEvent) {
|
|
102
|
+
if (e.eventType == PluginEventType.KeyPress && e.rawEvent.which == 65) {
|
|
103
|
+
alert('Hello Rooster');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Installation
|
|
110
|
+
|
|
111
|
+
Install via NPM or Yarn:
|
|
112
|
+
|
|
113
|
+
`yarn add roosterjs`
|
|
114
|
+
|
|
115
|
+
You can also install sub packages separately:
|
|
116
|
+
|
|
117
|
+
`yarn add roosterjs-editor-core`
|
|
118
|
+
|
|
119
|
+
`yarn add roosterjs-editor-api`
|
|
120
|
+
|
|
121
|
+
`...`
|
|
122
|
+
|
|
123
|
+
In order to run the code below, you may also need to install [webpack](https://webpack.js.org/):
|
|
124
|
+
|
|
125
|
+
`yarn add webpack -g`
|
|
126
|
+
|
|
127
|
+
## Usage
|
|
128
|
+
|
|
129
|
+
### A quick start
|
|
130
|
+
|
|
131
|
+
1. Create `editor.htm` which contains a DIV with some styles, buttons to handle some click events and a reference to rooster.js (update with the path to your rooster.js file):
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<html>
|
|
135
|
+
<body>
|
|
136
|
+
<div style="width: 500px; height: 400px; border: solid 1px black" id="contentDiv"></div>
|
|
137
|
+
<button id="buttonB">B</button> <button id="buttonI">I</button>
|
|
138
|
+
<button id="buttonU">U</button>
|
|
139
|
+
<script src="rooster.js"></script>
|
|
140
|
+
<script>
|
|
141
|
+
var contentDiv = document.getElementById('contentDiv');
|
|
142
|
+
var editor = roosterjs.createEditor(contentDiv);
|
|
143
|
+
|
|
144
|
+
editor.setContent('Welcome to <b>RoosterJs</b>!');
|
|
145
|
+
document.getElementById('buttonB').addEventListener('click', function () {
|
|
146
|
+
roosterjs.toggleBold(editor);
|
|
147
|
+
});
|
|
148
|
+
document.getElementById('buttonI').addEventListener('click', function () {
|
|
149
|
+
roosterjs.toggleItalic(editor);
|
|
150
|
+
});
|
|
151
|
+
document.getElementById('buttonU').addEventListener('click', function () {
|
|
152
|
+
roosterjs.toggleUnderline(editor);
|
|
153
|
+
});
|
|
154
|
+
</script>
|
|
155
|
+
</body>
|
|
156
|
+
</html>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
2. Navigate to editor.htm, you will see a editor shown in the page which includes buttons with bold, italic, underline
|
|
160
|
+
actions.
|
|
161
|
+
|
|
162
|
+
## Sample code
|
|
163
|
+
|
|
164
|
+
To view the sample site, please click [here](https://microsoft.github.io/roosterjs/index.html).
|
|
165
|
+
|
|
166
|
+
To build the sample site code yourself, follow these instructions:
|
|
167
|
+
|
|
168
|
+
1. Get dependencies using [yarn](https://yarnpkg.com) or [npm](https://www.npmjs.com/):
|
|
169
|
+
|
|
170
|
+
```cmd
|
|
171
|
+
yarn
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
2. Build the source code, and start the sample editor:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
yarn start
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
or
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
npm start
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Debugging
|
|
187
|
+
|
|
188
|
+
There are two options for debugging:
|
|
189
|
+
|
|
190
|
+
1. Debugging from VSCode
|
|
191
|
+
|
|
192
|
+
- Ensure the sample editor is running
|
|
193
|
+
- Set the breakpoints within VSCode
|
|
194
|
+
- Select "Debug app in Chrome" from the VSCode debugging configuration dropdown
|
|
195
|
+
<img src="/assets/readme-images/debug-in-VSCode.png" width="411" height="278"><br>
|
|
196
|
+
- Run the scenario that needs to be debugged
|
|
197
|
+
|
|
198
|
+
2. Debugging directly from the development tools within the web browser
|
|
199
|
+
- The directions for how to do this are specific to each web browser. By opening the developer
|
|
200
|
+
tools for the web browser that Rooster is running on, you will be able to set breakpoints in
|
|
201
|
+
the code and debug accordingly.
|
|
202
|
+
|
|
203
|
+
## Running tests
|
|
204
|
+
|
|
205
|
+
There are two ways that tests can be run:
|
|
206
|
+
|
|
207
|
+
1. Run all tests or a single test from VSCode<br>
|
|
208
|
+
- (Skip if running all tests) Ensure the file that you want to test is selected (ie: toggleBold.ts
|
|
209
|
+
or toggleBoldTest.ts)
|
|
210
|
+
- Select "Test all files" or "Test current file" from the VSCode debugging configuration dropdown
|
|
211
|
+
<img src="/assets/readme-images/test-in-VSCode.png" width="402" height="268">
|
|
212
|
+
2. Run all tests from command line
|
|
213
|
+
```
|
|
214
|
+
yarn test
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Dependencies
|
|
218
|
+
|
|
219
|
+
As a NodeJs package, RoosterJs has dependencies for runtime (specified in package.json under each sub
|
|
220
|
+
packages in "dependencies" section) and dependencies for build time (specified in package.json under
|
|
221
|
+
root path in "devDependencies" section).
|
|
222
|
+
|
|
223
|
+
For runtime dependencies, there are two parts:
|
|
224
|
+
|
|
225
|
+
- Internal dependencies (a RoosterJs package depends on other RoosterJs packages)
|
|
226
|
+
- External dependencies (RoosterJs depends on other NPM packages)
|
|
227
|
+
|
|
228
|
+
Currently we have very few external dependencies. Before adding any new dependency, we need to check:
|
|
229
|
+
|
|
230
|
+
1. What's the value of the new dependency and the code using the dependency bring into roosterjs?
|
|
231
|
+
If we add a new dependency and create our new API to just call into the dependency, that new API
|
|
232
|
+
doesn't actually bring too much value, and people who uses roosterjs in their project can do this
|
|
233
|
+
themselves in their code, and we should not add such dependency to people who don't really need it.
|
|
234
|
+
|
|
235
|
+
2. What's the dependency tree of the dependency?
|
|
236
|
+
If we introduce a new dependency which has a deep dependency tree, we need to be careful since it
|
|
237
|
+
means we are actually adding a lot of new dependencies and our code size may be increased a lot.
|
|
238
|
+
|
|
239
|
+
3. How much functionalities do we need from the dependency?
|
|
240
|
+
If the dependency provides a lot of functionalities but we actually only need a small piece of them,
|
|
241
|
+
we may need to consider other solutions, such as find another smaller one, or do it ourselves.
|
|
242
|
+
|
|
243
|
+
4. What's the license of the dependency?
|
|
244
|
+
A dependency package under MIT license is good to be used for RoosterJs. For other licenses, we need
|
|
245
|
+
to review and see if we can take it as a dependency.
|
|
246
|
+
|
|
247
|
+
If you still feel a new dependency is required after checking these questions, we can review it and
|
|
248
|
+
finally decide whether we should add the new dependency.
|
|
249
|
+
|
|
250
|
+
For build time dependencies, it is more flexible to add new dependencies since it won't increase runtime
|
|
251
|
+
code size or dependencies.
|
|
252
|
+
|
|
253
|
+
## More documentation
|
|
254
|
+
|
|
255
|
+
We are still working on more documentation in [roosterjs wiki](https://github.com/Microsoft/roosterjs/wiki) and [API reference](https://microsoft.github.io/roosterjs/docs/index.html).
|
|
256
|
+
|
|
257
|
+
## License - MIT
|
|
258
|
+
|
|
259
|
+
License
|
|
260
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
261
|
+
|
|
262
|
+
Licensed under the [MIT](LICENSE) License.
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export { default as insertTable } from './publicApi/table/insertTable';
|
|
2
|
+
export { default as formatTable } from './publicApi/table/formatTable';
|
|
3
|
+
export { default as setTableCellShade } from './publicApi/table/setTableCellShade';
|
|
4
|
+
export { default as editTable } from './publicApi/table/editTable';
|
|
5
|
+
export { default as applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';
|
|
6
|
+
export { default as toggleBullet } from './publicApi/list/toggleBullet';
|
|
7
|
+
export { default as toggleNumbering } from './publicApi/list/toggleNumbering';
|
|
8
|
+
export { default as toggleBold } from './publicApi/segment/toggleBold';
|
|
9
|
+
export { default as toggleItalic } from './publicApi/segment/toggleItalic';
|
|
10
|
+
export { default as toggleUnderline } from './publicApi/segment/toggleUnderline';
|
|
11
|
+
export { default as toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';
|
|
12
|
+
export { default as toggleSubscript } from './publicApi/segment/toggleSubscript';
|
|
13
|
+
export { default as toggleSuperscript } from './publicApi/segment/toggleSuperscript';
|
|
14
|
+
export { default as setBackgroundColor } from './publicApi/segment/setBackgroundColor';
|
|
15
|
+
export { default as setFontName } from './publicApi/segment/setFontName';
|
|
16
|
+
export { default as setFontSize } from './publicApi/segment/setFontSize';
|
|
17
|
+
export { default as setTextColor } from './publicApi/segment/setTextColor';
|
|
18
|
+
export { default as changeFontSize } from './publicApi/segment/changeFontSize';
|
|
19
|
+
export { default as applySegmentFormat } from './publicApi/segment/applySegmentFormat';
|
|
20
|
+
export { default as changeCapitalization } from './publicApi/segment/changeCapitalization';
|
|
21
|
+
export { default as insertImage } from './publicApi/image/insertImage';
|
|
22
|
+
export { default as setListStyle } from './publicApi/list/setListStyle';
|
|
23
|
+
export { default as setListStartNumber } from './publicApi/list/setListStartNumber';
|
|
24
|
+
export { default as hasSelectionInBlock } from './publicApi/selection/hasSelectionInBlock';
|
|
25
|
+
export { default as hasSelectionInSegment } from './publicApi/selection/hasSelectionInSegment';
|
|
26
|
+
export { default as hasSelectionInBlockGroup } from './publicApi/selection/hasSelectionInBlockGroup';
|
|
27
|
+
export { default as setIndentation } from './publicApi/block/setIndentation';
|
|
28
|
+
export { default as setAlignment } from './publicApi/block/setAlignment';
|
|
29
|
+
export { default as setDirection } from './publicApi/block/setDirection';
|
|
30
|
+
export { default as setHeadingLevel } from './publicApi/block/setHeadingLevel';
|
|
31
|
+
export { default as toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
|
|
32
|
+
export { default as setSpacing } from './publicApi/block/setSpacing';
|
|
33
|
+
export { default as setImageBorder } from './publicApi/image/setImageBorder';
|
|
34
|
+
export { default as setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
|
|
35
|
+
export { default as changeImage } from './publicApi/image/changeImage';
|
|
36
|
+
export { default as getFormatState } from './publicApi/format/getFormatState';
|
|
37
|
+
export { default as clearFormat } from './publicApi/format/clearFormat';
|
|
38
|
+
export { default as insertLink } from './publicApi/link/insertLink';
|
|
39
|
+
export { default as removeLink } from './publicApi/link/removeLink';
|
|
40
|
+
export { default as adjustLinkSelection } from './publicApi/link/adjustLinkSelection';
|
|
41
|
+
export { default as setImageAltText } from './publicApi/image/setImageAltText';
|
|
42
|
+
export { default as adjustImageSelection } from './publicApi/image/adjustImageSelection';
|
|
43
|
+
export { default as setParagraphMargin } from './publicApi/block/setParagraphMargin';
|
|
44
|
+
export { default as toggleCode } from './publicApi/segment/toggleCode';
|
|
45
|
+
export { default as insertEntity } from './publicApi/entity/insertEntity';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.setIndentation = exports.hasSelectionInBlockGroup = exports.hasSelectionInSegment = exports.hasSelectionInBlock = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.changeCapitalization = exports.applySegmentFormat = exports.changeFontSize = exports.setTextColor = exports.setFontSize = exports.setFontName = exports.setBackgroundColor = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleUnderline = exports.toggleItalic = exports.toggleBold = exports.toggleNumbering = exports.toggleBullet = exports.applyTableBorderFormat = exports.editTable = exports.setTableCellShade = exports.formatTable = exports.insertTable = void 0;
|
|
4
|
+
var insertTable_1 = require("./publicApi/table/insertTable");
|
|
5
|
+
Object.defineProperty(exports, "insertTable", { enumerable: true, get: function () { return insertTable_1.default; } });
|
|
6
|
+
var formatTable_1 = require("./publicApi/table/formatTable");
|
|
7
|
+
Object.defineProperty(exports, "formatTable", { enumerable: true, get: function () { return formatTable_1.default; } });
|
|
8
|
+
var setTableCellShade_1 = require("./publicApi/table/setTableCellShade");
|
|
9
|
+
Object.defineProperty(exports, "setTableCellShade", { enumerable: true, get: function () { return setTableCellShade_1.default; } });
|
|
10
|
+
var editTable_1 = require("./publicApi/table/editTable");
|
|
11
|
+
Object.defineProperty(exports, "editTable", { enumerable: true, get: function () { return editTable_1.default; } });
|
|
12
|
+
var applyTableBorderFormat_1 = require("./publicApi/table/applyTableBorderFormat");
|
|
13
|
+
Object.defineProperty(exports, "applyTableBorderFormat", { enumerable: true, get: function () { return applyTableBorderFormat_1.default; } });
|
|
14
|
+
var toggleBullet_1 = require("./publicApi/list/toggleBullet");
|
|
15
|
+
Object.defineProperty(exports, "toggleBullet", { enumerable: true, get: function () { return toggleBullet_1.default; } });
|
|
16
|
+
var toggleNumbering_1 = require("./publicApi/list/toggleNumbering");
|
|
17
|
+
Object.defineProperty(exports, "toggleNumbering", { enumerable: true, get: function () { return toggleNumbering_1.default; } });
|
|
18
|
+
var toggleBold_1 = require("./publicApi/segment/toggleBold");
|
|
19
|
+
Object.defineProperty(exports, "toggleBold", { enumerable: true, get: function () { return toggleBold_1.default; } });
|
|
20
|
+
var toggleItalic_1 = require("./publicApi/segment/toggleItalic");
|
|
21
|
+
Object.defineProperty(exports, "toggleItalic", { enumerable: true, get: function () { return toggleItalic_1.default; } });
|
|
22
|
+
var toggleUnderline_1 = require("./publicApi/segment/toggleUnderline");
|
|
23
|
+
Object.defineProperty(exports, "toggleUnderline", { enumerable: true, get: function () { return toggleUnderline_1.default; } });
|
|
24
|
+
var toggleStrikethrough_1 = require("./publicApi/segment/toggleStrikethrough");
|
|
25
|
+
Object.defineProperty(exports, "toggleStrikethrough", { enumerable: true, get: function () { return toggleStrikethrough_1.default; } });
|
|
26
|
+
var toggleSubscript_1 = require("./publicApi/segment/toggleSubscript");
|
|
27
|
+
Object.defineProperty(exports, "toggleSubscript", { enumerable: true, get: function () { return toggleSubscript_1.default; } });
|
|
28
|
+
var toggleSuperscript_1 = require("./publicApi/segment/toggleSuperscript");
|
|
29
|
+
Object.defineProperty(exports, "toggleSuperscript", { enumerable: true, get: function () { return toggleSuperscript_1.default; } });
|
|
30
|
+
var setBackgroundColor_1 = require("./publicApi/segment/setBackgroundColor");
|
|
31
|
+
Object.defineProperty(exports, "setBackgroundColor", { enumerable: true, get: function () { return setBackgroundColor_1.default; } });
|
|
32
|
+
var setFontName_1 = require("./publicApi/segment/setFontName");
|
|
33
|
+
Object.defineProperty(exports, "setFontName", { enumerable: true, get: function () { return setFontName_1.default; } });
|
|
34
|
+
var setFontSize_1 = require("./publicApi/segment/setFontSize");
|
|
35
|
+
Object.defineProperty(exports, "setFontSize", { enumerable: true, get: function () { return setFontSize_1.default; } });
|
|
36
|
+
var setTextColor_1 = require("./publicApi/segment/setTextColor");
|
|
37
|
+
Object.defineProperty(exports, "setTextColor", { enumerable: true, get: function () { return setTextColor_1.default; } });
|
|
38
|
+
var changeFontSize_1 = require("./publicApi/segment/changeFontSize");
|
|
39
|
+
Object.defineProperty(exports, "changeFontSize", { enumerable: true, get: function () { return changeFontSize_1.default; } });
|
|
40
|
+
var applySegmentFormat_1 = require("./publicApi/segment/applySegmentFormat");
|
|
41
|
+
Object.defineProperty(exports, "applySegmentFormat", { enumerable: true, get: function () { return applySegmentFormat_1.default; } });
|
|
42
|
+
var changeCapitalization_1 = require("./publicApi/segment/changeCapitalization");
|
|
43
|
+
Object.defineProperty(exports, "changeCapitalization", { enumerable: true, get: function () { return changeCapitalization_1.default; } });
|
|
44
|
+
var insertImage_1 = require("./publicApi/image/insertImage");
|
|
45
|
+
Object.defineProperty(exports, "insertImage", { enumerable: true, get: function () { return insertImage_1.default; } });
|
|
46
|
+
var setListStyle_1 = require("./publicApi/list/setListStyle");
|
|
47
|
+
Object.defineProperty(exports, "setListStyle", { enumerable: true, get: function () { return setListStyle_1.default; } });
|
|
48
|
+
var setListStartNumber_1 = require("./publicApi/list/setListStartNumber");
|
|
49
|
+
Object.defineProperty(exports, "setListStartNumber", { enumerable: true, get: function () { return setListStartNumber_1.default; } });
|
|
50
|
+
var hasSelectionInBlock_1 = require("./publicApi/selection/hasSelectionInBlock");
|
|
51
|
+
Object.defineProperty(exports, "hasSelectionInBlock", { enumerable: true, get: function () { return hasSelectionInBlock_1.default; } });
|
|
52
|
+
var hasSelectionInSegment_1 = require("./publicApi/selection/hasSelectionInSegment");
|
|
53
|
+
Object.defineProperty(exports, "hasSelectionInSegment", { enumerable: true, get: function () { return hasSelectionInSegment_1.default; } });
|
|
54
|
+
var hasSelectionInBlockGroup_1 = require("./publicApi/selection/hasSelectionInBlockGroup");
|
|
55
|
+
Object.defineProperty(exports, "hasSelectionInBlockGroup", { enumerable: true, get: function () { return hasSelectionInBlockGroup_1.default; } });
|
|
56
|
+
var setIndentation_1 = require("./publicApi/block/setIndentation");
|
|
57
|
+
Object.defineProperty(exports, "setIndentation", { enumerable: true, get: function () { return setIndentation_1.default; } });
|
|
58
|
+
var setAlignment_1 = require("./publicApi/block/setAlignment");
|
|
59
|
+
Object.defineProperty(exports, "setAlignment", { enumerable: true, get: function () { return setAlignment_1.default; } });
|
|
60
|
+
var setDirection_1 = require("./publicApi/block/setDirection");
|
|
61
|
+
Object.defineProperty(exports, "setDirection", { enumerable: true, get: function () { return setDirection_1.default; } });
|
|
62
|
+
var setHeadingLevel_1 = require("./publicApi/block/setHeadingLevel");
|
|
63
|
+
Object.defineProperty(exports, "setHeadingLevel", { enumerable: true, get: function () { return setHeadingLevel_1.default; } });
|
|
64
|
+
var toggleBlockQuote_1 = require("./publicApi/block/toggleBlockQuote");
|
|
65
|
+
Object.defineProperty(exports, "toggleBlockQuote", { enumerable: true, get: function () { return toggleBlockQuote_1.default; } });
|
|
66
|
+
var setSpacing_1 = require("./publicApi/block/setSpacing");
|
|
67
|
+
Object.defineProperty(exports, "setSpacing", { enumerable: true, get: function () { return setSpacing_1.default; } });
|
|
68
|
+
var setImageBorder_1 = require("./publicApi/image/setImageBorder");
|
|
69
|
+
Object.defineProperty(exports, "setImageBorder", { enumerable: true, get: function () { return setImageBorder_1.default; } });
|
|
70
|
+
var setImageBoxShadow_1 = require("./publicApi/image/setImageBoxShadow");
|
|
71
|
+
Object.defineProperty(exports, "setImageBoxShadow", { enumerable: true, get: function () { return setImageBoxShadow_1.default; } });
|
|
72
|
+
var changeImage_1 = require("./publicApi/image/changeImage");
|
|
73
|
+
Object.defineProperty(exports, "changeImage", { enumerable: true, get: function () { return changeImage_1.default; } });
|
|
74
|
+
var getFormatState_1 = require("./publicApi/format/getFormatState");
|
|
75
|
+
Object.defineProperty(exports, "getFormatState", { enumerable: true, get: function () { return getFormatState_1.default; } });
|
|
76
|
+
var clearFormat_1 = require("./publicApi/format/clearFormat");
|
|
77
|
+
Object.defineProperty(exports, "clearFormat", { enumerable: true, get: function () { return clearFormat_1.default; } });
|
|
78
|
+
var insertLink_1 = require("./publicApi/link/insertLink");
|
|
79
|
+
Object.defineProperty(exports, "insertLink", { enumerable: true, get: function () { return insertLink_1.default; } });
|
|
80
|
+
var removeLink_1 = require("./publicApi/link/removeLink");
|
|
81
|
+
Object.defineProperty(exports, "removeLink", { enumerable: true, get: function () { return removeLink_1.default; } });
|
|
82
|
+
var adjustLinkSelection_1 = require("./publicApi/link/adjustLinkSelection");
|
|
83
|
+
Object.defineProperty(exports, "adjustLinkSelection", { enumerable: true, get: function () { return adjustLinkSelection_1.default; } });
|
|
84
|
+
var setImageAltText_1 = require("./publicApi/image/setImageAltText");
|
|
85
|
+
Object.defineProperty(exports, "setImageAltText", { enumerable: true, get: function () { return setImageAltText_1.default; } });
|
|
86
|
+
var adjustImageSelection_1 = require("./publicApi/image/adjustImageSelection");
|
|
87
|
+
Object.defineProperty(exports, "adjustImageSelection", { enumerable: true, get: function () { return adjustImageSelection_1.default; } });
|
|
88
|
+
var setParagraphMargin_1 = require("./publicApi/block/setParagraphMargin");
|
|
89
|
+
Object.defineProperty(exports, "setParagraphMargin", { enumerable: true, get: function () { return setParagraphMargin_1.default; } });
|
|
90
|
+
var toggleCode_1 = require("./publicApi/segment/toggleCode");
|
|
91
|
+
Object.defineProperty(exports, "toggleCode", { enumerable: true, get: function () { return toggleCode_1.default; } });
|
|
92
|
+
var insertEntity_1 = require("./publicApi/entity/insertEntity");
|
|
93
|
+
Object.defineProperty(exports, "insertEntity", { enumerable: true, get: function () { return insertEntity_1.default; } });
|
|
94
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages-content-model/roosterjs-content-model-api/lib/index.ts"],"names":[],"mappings":";;;AAAA,6DAAuE;AAA9D,0GAAA,OAAO,OAAe;AAC/B,6DAAuE;AAA9D,0GAAA,OAAO,OAAe;AAC/B,yEAAmF;AAA1E,sHAAA,OAAO,OAAqB;AACrC,yDAAmE;AAA1D,sGAAA,OAAO,OAAa;AAC7B,mFAA6F;AAApF,gIAAA,OAAO,OAA0B;AAC1C,8DAAwE;AAA/D,4GAAA,OAAO,OAAgB;AAChC,oEAA8E;AAArE,kHAAA,OAAO,OAAmB;AACnC,6DAAuE;AAA9D,wGAAA,OAAO,OAAc;AAC9B,iEAA2E;AAAlE,4GAAA,OAAO,OAAgB;AAChC,uEAAiF;AAAxE,kHAAA,OAAO,OAAmB;AACnC,+EAAyF;AAAhF,0HAAA,OAAO,OAAuB;AACvC,uEAAiF;AAAxE,kHAAA,OAAO,OAAmB;AACnC,2EAAqF;AAA5E,sHAAA,OAAO,OAAqB;AACrC,6EAAuF;AAA9E,wHAAA,OAAO,OAAsB;AACtC,+DAAyE;AAAhE,0GAAA,OAAO,OAAe;AAC/B,+DAAyE;AAAhE,0GAAA,OAAO,OAAe;AAC/B,iEAA2E;AAAlE,4GAAA,OAAO,OAAgB;AAChC,qEAA+E;AAAtE,gHAAA,OAAO,OAAkB;AAClC,6EAAuF;AAA9E,wHAAA,OAAO,OAAsB;AACtC,iFAA2F;AAAlF,4HAAA,OAAO,OAAwB;AACxC,6DAAuE;AAA9D,0GAAA,OAAO,OAAe;AAC/B,8DAAwE;AAA/D,4GAAA,OAAO,OAAgB;AAChC,0EAAoF;AAA3E,wHAAA,OAAO,OAAsB;AACtC,iFAA2F;AAAlF,0HAAA,OAAO,OAAuB;AACvC,qFAA+F;AAAtF,8HAAA,OAAO,OAAyB;AACzC,2FAAqG;AAA5F,oIAAA,OAAO,OAA4B;AAC5C,mEAA6E;AAApE,gHAAA,OAAO,OAAkB;AAClC,+DAAyE;AAAhE,4GAAA,OAAO,OAAgB;AAChC,+DAAyE;AAAhE,4GAAA,OAAO,OAAgB;AAChC,qEAA+E;AAAtE,kHAAA,OAAO,OAAmB;AACnC,uEAAiF;AAAxE,oHAAA,OAAO,OAAoB;AACpC,2DAAqE;AAA5D,wGAAA,OAAO,OAAc;AAC9B,mEAA6E;AAApE,gHAAA,OAAO,OAAkB;AAClC,yEAAmF;AAA1E,sHAAA,OAAO,OAAqB;AACrC,6DAAuE;AAA9D,0GAAA,OAAO,OAAe;AAC/B,oEAA8E;AAArE,gHAAA,OAAO,OAAkB;AAClC,8DAAwE;AAA/D,0GAAA,OAAO,OAAe;AAC/B,0DAAoE;AAA3D,wGAAA,OAAO,OAAc;AAC9B,0DAAoE;AAA3D,wGAAA,OAAO,OAAc;AAC9B,4EAAsF;AAA7E,0HAAA,OAAO,OAAuB;AACvC,qEAA+E;AAAtE,kHAAA,OAAO,OAAmB;AACnC,+EAAyF;AAAhF,4HAAA,OAAO,OAAwB;AACxC,2EAAqF;AAA5E,wHAAA,OAAO,OAAsB;AACtC,6DAAuE;AAA9D,wGAAA,OAAO,OAAc;AAC9B,gEAA0E;AAAjE,4GAAA,OAAO,OAAgB","sourcesContent":["export { default as insertTable } from './publicApi/table/insertTable';\nexport { default as formatTable } from './publicApi/table/formatTable';\nexport { default as setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { default as editTable } from './publicApi/table/editTable';\nexport { default as applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { default as toggleBullet } from './publicApi/list/toggleBullet';\nexport { default as toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { default as toggleBold } from './publicApi/segment/toggleBold';\nexport { default as toggleItalic } from './publicApi/segment/toggleItalic';\nexport { default as toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { default as toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { default as toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { default as toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { default as setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { default as setFontName } from './publicApi/segment/setFontName';\nexport { default as setFontSize } from './publicApi/segment/setFontSize';\nexport { default as setTextColor } from './publicApi/segment/setTextColor';\nexport { default as changeFontSize } from './publicApi/segment/changeFontSize';\nexport { default as applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { default as changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { default as insertImage } from './publicApi/image/insertImage';\nexport { default as setListStyle } from './publicApi/list/setListStyle';\nexport { default as setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { default as hasSelectionInBlock } from './publicApi/selection/hasSelectionInBlock';\nexport { default as hasSelectionInSegment } from './publicApi/selection/hasSelectionInSegment';\nexport { default as hasSelectionInBlockGroup } from './publicApi/selection/hasSelectionInBlockGroup';\nexport { default as setIndentation } from './publicApi/block/setIndentation';\nexport { default as setAlignment } from './publicApi/block/setAlignment';\nexport { default as setDirection } from './publicApi/block/setDirection';\nexport { default as setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { default as toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { default as setSpacing } from './publicApi/block/setSpacing';\nexport { default as setImageBorder } from './publicApi/image/setImageBorder';\nexport { default as setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { default as changeImage } from './publicApi/image/changeImage';\nexport { default as getFormatState } from './publicApi/format/getFormatState';\nexport { default as clearFormat } from './publicApi/format/clearFormat';\nexport { default as insertLink } from './publicApi/link/insertLink';\nexport { default as removeLink } from './publicApi/link/removeLink';\nexport { default as adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { default as setImageAltText } from './publicApi/image/setImageAltText';\nexport { default as adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { default as setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { default as toggleCode } from './publicApi/segment/toggleCode';\nexport { default as insertEntity } from './publicApi/entity/insertEntity';\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setModelAlignment = void 0;
|
|
4
|
+
var alignTable_1 = require("../table/alignTable");
|
|
5
|
+
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
6
|
+
var ResultMap = {
|
|
7
|
+
left: {
|
|
8
|
+
ltr: 'start',
|
|
9
|
+
rtl: 'end',
|
|
10
|
+
},
|
|
11
|
+
center: {
|
|
12
|
+
ltr: 'center',
|
|
13
|
+
rtl: 'center',
|
|
14
|
+
},
|
|
15
|
+
right: {
|
|
16
|
+
ltr: 'end',
|
|
17
|
+
rtl: 'start',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
var TableAlignMap = {
|
|
21
|
+
left: {
|
|
22
|
+
ltr: 'alignLeft',
|
|
23
|
+
rtl: 'alignRight',
|
|
24
|
+
},
|
|
25
|
+
center: {
|
|
26
|
+
ltr: 'alignCenter',
|
|
27
|
+
rtl: 'alignCenter',
|
|
28
|
+
},
|
|
29
|
+
right: {
|
|
30
|
+
ltr: 'alignRight',
|
|
31
|
+
rtl: 'alignLeft',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
function setModelAlignment(model, alignment) {
|
|
38
|
+
var paragraphOrListItemOrTable = (0, roosterjs_content_model_core_1.getOperationalBlocks)(model, ['ListItem'], ['TableCell']);
|
|
39
|
+
paragraphOrListItemOrTable.forEach(function (_a) {
|
|
40
|
+
var block = _a.block;
|
|
41
|
+
var newAligment = ResultMap[alignment][block.format.direction == 'rtl' ? 'rtl' : 'ltr'];
|
|
42
|
+
if (block.blockType === 'Table') {
|
|
43
|
+
(0, alignTable_1.alignTable)(block, TableAlignMap[alignment][block.format.direction == 'rtl' ? 'rtl' : 'ltr']);
|
|
44
|
+
}
|
|
45
|
+
else if (block) {
|
|
46
|
+
var format = block.format;
|
|
47
|
+
format.textAlign = newAligment;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return paragraphOrListItemOrTable.length > 0;
|
|
51
|
+
}
|
|
52
|
+
exports.setModelAlignment = setModelAlignment;
|
|
53
|
+
//# sourceMappingURL=setModelAlignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setModelAlignment.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/modelApi/block/setModelAlignment.ts"],"names":[],"mappings":";;;AAAA,kDAAiD;AACjD,6EAAoE;AAOpE,IAAM,SAAS,GAGX;IACA,IAAI,EAAE;QACF,GAAG,EAAE,OAAO;QACZ,GAAG,EAAE,KAAK;KACb;IACD,MAAM,EAAE;QACJ,GAAG,EAAE,QAAQ;QACb,GAAG,EAAE,QAAQ;KAChB;IACD,KAAK,EAAE;QACH,GAAG,EAAE,KAAK;QACV,GAAG,EAAE,OAAO;KACf;CACJ,CAAC;AAEF,IAAM,aAAa,GAGf;IACA,IAAI,EAAE;QACF,GAAG,EAAE,WAAW;QAChB,GAAG,EAAE,YAAY;KACpB;IACD,MAAM,EAAE;QACJ,GAAG,EAAE,aAAa;QAClB,GAAG,EAAE,aAAa;KACrB;IACD,KAAK,EAAE;QACH,GAAG,EAAE,YAAY;QACjB,GAAG,EAAE,WAAW;KACnB;CACJ,CAAC;AAEF;;GAEG;AACH,SAAgB,iBAAiB,CAC7B,KAA2B,EAC3B,SAAsC;IAEtC,IAAM,0BAA0B,GAAG,IAAA,mDAAoB,EACnD,KAAK,EACL,CAAC,UAAU,CAAC,EACZ,CAAC,WAAW,CAAC,CAChB,CAAC;IAEF,0BAA0B,CAAC,OAAO,CAAC,UAAC,EAAS;YAAP,KAAK,WAAA;QACvC,IAAM,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1F,IAAI,KAAK,CAAC,SAAS,KAAK,OAAO,EAAE;YAC7B,IAAA,uBAAU,EACN,KAAK,EACL,aAAa,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAC5E,CAAC;SACL;aAAM,IAAI,KAAK,EAAE;YACN,IAAA,MAAM,GAAK,KAAK,OAAV,CAAW;YACzB,MAAM,CAAC,SAAS,GAAG,WAAW,CAAC;SAClC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,MAAM,GAAG,CAAC,CAAC;AACjD,CAAC;AAxBD,8CAwBC","sourcesContent":["import { alignTable } from '../table/alignTable';\nimport { getOperationalBlocks } from 'roosterjs-content-model-core';\nimport type {\n ContentModelDocument,\n ContentModelListItem,\n TableAlignOperation,\n} from 'roosterjs-content-model-types';\n\nconst ResultMap: Record<\n 'left' | 'center' | 'right',\n Record<'ltr' | 'rtl', 'start' | 'center' | 'end'>\n> = {\n left: {\n ltr: 'start',\n rtl: 'end',\n },\n center: {\n ltr: 'center',\n rtl: 'center',\n },\n right: {\n ltr: 'end',\n rtl: 'start',\n },\n};\n\nconst TableAlignMap: Record<\n 'left' | 'center' | 'right',\n Record<'ltr' | 'rtl', TableAlignOperation>\n> = {\n left: {\n ltr: 'alignLeft',\n rtl: 'alignRight',\n },\n center: {\n ltr: 'alignCenter',\n rtl: 'alignCenter',\n },\n right: {\n ltr: 'alignRight',\n rtl: 'alignLeft',\n },\n};\n\n/**\n * @internal\n */\nexport function setModelAlignment(\n model: ContentModelDocument,\n alignment: 'left' | 'center' | 'right'\n) {\n const paragraphOrListItemOrTable = getOperationalBlocks<ContentModelListItem>(\n model,\n ['ListItem'],\n ['TableCell']\n );\n\n paragraphOrListItemOrTable.forEach(({ block }) => {\n const newAligment = ResultMap[alignment][block.format.direction == 'rtl' ? 'rtl' : 'ltr'];\n if (block.blockType === 'Table') {\n alignTable(\n block,\n TableAlignMap[alignment][block.format.direction == 'rtl' ? 'rtl' : 'ltr']\n );\n } else if (block) {\n const { format } = block;\n format.textAlign = newAligment;\n }\n });\n\n return paragraphOrListItemOrTable.length > 0;\n}\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setModelDirection = void 0;
|
|
4
|
+
var findListItemsInSameThread_1 = require("../list/findListItemsInSameThread");
|
|
5
|
+
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
function setModelDirection(model, direction) {
|
|
10
|
+
var paragraphOrListItemOrTable = (0, roosterjs_content_model_core_1.getOperationalBlocks)(model, ['ListItem'], ['TableCell']);
|
|
11
|
+
paragraphOrListItemOrTable.forEach(function (_a) {
|
|
12
|
+
var block = _a.block;
|
|
13
|
+
if ((0, roosterjs_content_model_core_1.isBlockGroupOfType)(block, 'ListItem')) {
|
|
14
|
+
var items = (0, findListItemsInSameThread_1.findListItemsInSameThread)(model, block);
|
|
15
|
+
items.forEach(function (item) {
|
|
16
|
+
item.levels.forEach(function (level) {
|
|
17
|
+
level.format.direction = direction;
|
|
18
|
+
});
|
|
19
|
+
item.blocks.forEach(function (block) { return internalSetDirection(block.format, direction); });
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
else if (block) {
|
|
23
|
+
internalSetDirection(block.format, direction);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return paragraphOrListItemOrTable.length > 0;
|
|
27
|
+
}
|
|
28
|
+
exports.setModelDirection = setModelDirection;
|
|
29
|
+
function internalSetDirection(format, direction) {
|
|
30
|
+
var wasRtl = format.direction == 'rtl';
|
|
31
|
+
var isRtl = direction == 'rtl';
|
|
32
|
+
if (wasRtl != isRtl) {
|
|
33
|
+
format.direction = direction;
|
|
34
|
+
// Adjust margin when change direction
|
|
35
|
+
// TODO: make margin and padding direction-aware, like what we did for textAlign. So no need to adjust them here
|
|
36
|
+
// TODO: Do we also need to handle border here?
|
|
37
|
+
var marginLeft = format.marginLeft;
|
|
38
|
+
var paddingLeft = format.paddingLeft;
|
|
39
|
+
setProperty(format, 'marginLeft', format.marginRight);
|
|
40
|
+
setProperty(format, 'marginRight', marginLeft);
|
|
41
|
+
setProperty(format, 'paddingLeft', format.paddingRight);
|
|
42
|
+
setProperty(format, 'paddingRight', paddingLeft);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function setProperty(format, key, value) {
|
|
46
|
+
if (value) {
|
|
47
|
+
format[key] = value;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
delete format[key];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=setModelDirection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setModelDirection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/modelApi/block/setModelDirection.ts"],"names":[],"mappings":";;;AAAA,+EAA8E;AAC9E,6EAAwF;AASxF;;GAEG;AACH,SAAgB,iBAAiB,CAAC,KAA2B,EAAE,SAAwB;IACnF,IAAM,0BAA0B,GAAG,IAAA,mDAAoB,EACnD,KAAK,EACL,CAAC,UAAU,CAAC,EACZ,CAAC,WAAW,CAAC,CAChB,CAAC;IAEF,0BAA0B,CAAC,OAAO,CAAC,UAAC,EAAS;YAAP,KAAK,WAAA;QACvC,IAAI,IAAA,iDAAkB,EAAuB,KAAK,EAAE,UAAU,CAAC,EAAE;YAC7D,IAAM,KAAK,GAAG,IAAA,qDAAyB,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAEtD,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;gBACd,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK;oBACrB,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;gBACvC,CAAC,CAAC,CAAC;gBAEH,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK,IAAI,OAAA,oBAAoB,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,EAA7C,CAA6C,CAAC,CAAC;YAChF,CAAC,CAAC,CAAC;SACN;aAAM,IAAI,KAAK,EAAE;YACd,oBAAoB,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;SACjD;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC,MAAM,GAAG,CAAC,CAAC;AACjD,CAAC;AAxBD,8CAwBC;AAED,SAAS,oBAAoB,CAAC,MAA+B,EAAE,SAAwB;IACnF,IAAM,MAAM,GAAG,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC;IACzC,IAAM,KAAK,GAAG,SAAS,IAAI,KAAK,CAAC;IAEjC,IAAI,MAAM,IAAI,KAAK,EAAE;QACjB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAE7B,sCAAsC;QACtC,gHAAgH;QAChH,+CAA+C;QAC/C,IAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACrC,IAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAEvC,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QACtD,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;QAC/C,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QACxD,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;KACpD;AACL,CAAC;AAED,SAAS,WAAW,CAChB,MAAoC,EACpC,GAAyC,EACzC,KAAyB;IAEzB,IAAI,KAAK,EAAE;QACP,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;KACvB;SAAM;QACH,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;KACtB;AACL,CAAC","sourcesContent":["import { findListItemsInSameThread } from '../list/findListItemsInSameThread';\nimport { getOperationalBlocks, isBlockGroupOfType } from 'roosterjs-content-model-core';\nimport type {\n ContentModelBlockFormat,\n ContentModelDocument,\n ContentModelListItem,\n MarginFormat,\n PaddingFormat,\n} from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport function setModelDirection(model: ContentModelDocument, direction: 'ltr' | 'rtl') {\n const paragraphOrListItemOrTable = getOperationalBlocks<ContentModelListItem>(\n model,\n ['ListItem'],\n ['TableCell']\n );\n\n paragraphOrListItemOrTable.forEach(({ block }) => {\n if (isBlockGroupOfType<ContentModelListItem>(block, 'ListItem')) {\n const items = findListItemsInSameThread(model, block);\n\n items.forEach(item => {\n item.levels.forEach(level => {\n level.format.direction = direction;\n });\n\n item.blocks.forEach(block => internalSetDirection(block.format, direction));\n });\n } else if (block) {\n internalSetDirection(block.format, direction);\n }\n });\n\n return paragraphOrListItemOrTable.length > 0;\n}\n\nfunction internalSetDirection(format: ContentModelBlockFormat, direction: 'ltr' | 'rtl') {\n const wasRtl = format.direction == 'rtl';\n const isRtl = direction == 'rtl';\n\n if (wasRtl != isRtl) {\n format.direction = direction;\n\n // Adjust margin when change direction\n // TODO: make margin and padding direction-aware, like what we did for textAlign. So no need to adjust them here\n // TODO: Do we also need to handle border here?\n const marginLeft = format.marginLeft;\n const paddingLeft = format.paddingLeft;\n\n setProperty(format, 'marginLeft', format.marginRight);\n setProperty(format, 'marginRight', marginLeft);\n setProperty(format, 'paddingLeft', format.paddingRight);\n setProperty(format, 'paddingRight', paddingLeft);\n }\n}\n\nfunction setProperty(\n format: MarginFormat & PaddingFormat,\n key: keyof (MarginFormat & PaddingFormat),\n value: string | undefined\n) {\n if (value) {\n format[key] = value;\n } else {\n delete format[key];\n }\n}\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setModelIndentation = void 0;
|
|
4
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
+
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
6
|
+
var IndentStepInPixel = 40;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
function setModelIndentation(model, indentation, length) {
|
|
11
|
+
if (length === void 0) { length = IndentStepInPixel; }
|
|
12
|
+
var paragraphOrListItem = (0, roosterjs_content_model_core_1.getOperationalBlocks)(model, ['ListItem'], ['TableCell']);
|
|
13
|
+
var isIndent = indentation == 'indent';
|
|
14
|
+
paragraphOrListItem.forEach(function (_a) {
|
|
15
|
+
var block = _a.block;
|
|
16
|
+
if ((0, roosterjs_content_model_core_1.isBlockGroupOfType)(block, 'ListItem')) {
|
|
17
|
+
if (isIndent) {
|
|
18
|
+
var lastLevel = block.levels[block.levels.length - 1];
|
|
19
|
+
var newLevel = (0, roosterjs_content_model_dom_1.createListLevel)((lastLevel === null || lastLevel === void 0 ? void 0 : lastLevel.listType) || 'UL', lastLevel === null || lastLevel === void 0 ? void 0 : lastLevel.format);
|
|
20
|
+
// New level is totally new, no need to have these attributes for now
|
|
21
|
+
delete newLevel.format.startNumberOverride;
|
|
22
|
+
block.levels.push(newLevel);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
block.levels.pop();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else if (block) {
|
|
29
|
+
var format = block.format;
|
|
30
|
+
var marginLeft = format.marginLeft, marginRight = format.marginRight, direction = format.direction;
|
|
31
|
+
var isRtl = direction == 'rtl';
|
|
32
|
+
var originalValue = (0, roosterjs_content_model_dom_1.parseValueWithUnit)(isRtl ? marginRight : marginLeft);
|
|
33
|
+
var newValue = (isIndent ? Math.ceil : Math.floor)(originalValue / length) * length;
|
|
34
|
+
if (newValue == originalValue) {
|
|
35
|
+
newValue = Math.max(newValue + length * (isIndent ? 1 : -1), 0);
|
|
36
|
+
}
|
|
37
|
+
if (isRtl) {
|
|
38
|
+
format.marginRight = newValue + 'px';
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
format.marginLeft = newValue + 'px';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return paragraphOrListItem.length > 0;
|
|
46
|
+
}
|
|
47
|
+
exports.setModelIndentation = setModelIndentation;
|
|
48
|
+
//# sourceMappingURL=setModelIndentation.js.map
|