roosterjs-content-model-api 9.61.0 → 9.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +3 -0
- package/lib/index.js +8 -2
- package/lib/index.js.map +1 -1
- package/lib/modelApi/block/insertHorizontalLineIntoModel.d.ts +5 -0
- package/lib/modelApi/block/insertHorizontalLineIntoModel.js +23 -0
- package/lib/modelApi/block/insertHorizontalLineIntoModel.js.map +1 -0
- package/lib/publicApi/block/insertHorizontalLine.d.ts +7 -0
- package/lib/publicApi/block/insertHorizontalLine.js +17 -0
- package/lib/publicApi/block/insertHorizontalLine.js.map +1 -0
- package/lib/publicApi/image/setImageSize.d.ts +8 -0
- package/lib/publicApi/image/setImageSize.js +19 -0
- package/lib/publicApi/image/setImageSize.js.map +1 -0
- package/lib-amd/index.d.ts +3 -0
- package/lib-amd/index.js +5 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/modelApi/block/insertHorizontalLineIntoModel.d.ts +5 -0
- package/lib-amd/modelApi/block/insertHorizontalLineIntoModel.js +24 -0
- package/lib-amd/modelApi/block/insertHorizontalLineIntoModel.js.map +1 -0
- package/lib-amd/publicApi/block/insertHorizontalLine.d.ts +7 -0
- package/lib-amd/publicApi/block/insertHorizontalLine.js +18 -0
- package/lib-amd/publicApi/block/insertHorizontalLine.js.map +1 -0
- package/lib-amd/publicApi/image/setImageSize.d.ts +8 -0
- package/lib-amd/publicApi/image/setImageSize.js +20 -0
- package/lib-amd/publicApi/image/setImageSize.js.map +1 -0
- package/lib-mjs/index.d.ts +3 -0
- package/lib-mjs/index.js +3 -0
- package/lib-mjs/index.js.map +1 -1
- package/lib-mjs/modelApi/block/insertHorizontalLineIntoModel.d.ts +5 -0
- package/lib-mjs/modelApi/block/insertHorizontalLineIntoModel.js +19 -0
- package/lib-mjs/modelApi/block/insertHorizontalLineIntoModel.js.map +1 -0
- package/lib-mjs/publicApi/block/insertHorizontalLine.d.ts +7 -0
- package/lib-mjs/publicApi/block/insertHorizontalLine.js +13 -0
- package/lib-mjs/publicApi/block/insertHorizontalLine.js.map +1 -0
- package/lib-mjs/publicApi/image/setImageSize.d.ts +8 -0
- package/lib-mjs/publicApi/image/setImageSize.js +15 -0
- package/lib-mjs/publicApi/image/setImageSize.js.map +1 -0
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { insertImage } from './publicApi/image/insertImage';
|
|
|
23
23
|
export { setListStyle } from './publicApi/list/setListStyle';
|
|
24
24
|
export { setListStartNumber } from './publicApi/list/setListStartNumber';
|
|
25
25
|
export { setIndentation } from './publicApi/block/setIndentation';
|
|
26
|
+
export { insertHorizontalLine } from './publicApi/block/insertHorizontalLine';
|
|
26
27
|
export { setAlignment } from './publicApi/block/setAlignment';
|
|
27
28
|
export { setDirection } from './publicApi/block/setDirection';
|
|
28
29
|
export { setHeadingLevel } from './publicApi/block/setHeadingLevel';
|
|
@@ -30,6 +31,7 @@ export { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
|
|
|
30
31
|
export { setSpacing } from './publicApi/block/setSpacing';
|
|
31
32
|
export { setImageBorder } from './publicApi/image/setImageBorder';
|
|
32
33
|
export { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
|
|
34
|
+
export { setImageSize } from './publicApi/image/setImageSize';
|
|
33
35
|
export { changeImage } from './publicApi/image/changeImage';
|
|
34
36
|
export { getFormatState } from './publicApi/format/getFormatState';
|
|
35
37
|
export { clearFormat } from './publicApi/format/clearFormat';
|
|
@@ -56,6 +58,7 @@ export { setModelListStyle } from './modelApi/list/setModelListStyle';
|
|
|
56
58
|
export { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';
|
|
57
59
|
export { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';
|
|
58
60
|
export { setModelIndentation } from './modelApi/block/setModelIndentation';
|
|
61
|
+
export { insertHorizontalLineIntoModel } from './modelApi/block/insertHorizontalLineIntoModel';
|
|
59
62
|
export { getTextDirection } from './modelApi/block/setModelDirection';
|
|
60
63
|
export { matchLink } from './modelApi/link/matchLink';
|
|
61
64
|
export { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.adjustWordSelection = exports.queryContentModelBlocks = exports.getListAnnounceData = exports.getPromoteLink = exports.promoteLink = exports.matchLink = exports.getTextDirection = exports.setModelIndentation = exports.findListItemsInSameThread = exports.setModelListStartNumber = exports.setModelListStyle = exports.setListType = exports.formatInsertPointWithContentModel = exports.formatTextSegmentBeforeSelectionMarker = exports.formatSegmentWithContentModel = void 0;
|
|
3
|
+
exports.formatTableWithContentModel = exports.createEditorContextForEntity = exports.clearSelectedCells = exports.insertTableColumn = exports.insertTableRow = exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageSize = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.insertHorizontalLine = exports.setIndentation = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.splitTextSegment = 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
|
+
exports.adjustWordSelection = exports.queryContentModelBlocks = exports.getListAnnounceData = exports.getPromoteLink = exports.promoteLink = exports.matchLink = exports.getTextDirection = exports.insertHorizontalLineIntoModel = exports.setModelIndentation = exports.findListItemsInSameThread = exports.setModelListStartNumber = exports.setModelListStyle = exports.setListType = exports.formatInsertPointWithContentModel = exports.formatTextSegmentBeforeSelectionMarker = exports.formatSegmentWithContentModel = exports.formatParagraphWithContentModel = exports.formatImageWithContentModel = void 0;
|
|
5
5
|
var insertTable_1 = require("./publicApi/table/insertTable");
|
|
6
6
|
Object.defineProperty(exports, "insertTable", { enumerable: true, get: function () { return insertTable_1.insertTable; } });
|
|
7
7
|
var formatTable_1 = require("./publicApi/table/formatTable");
|
|
@@ -52,6 +52,8 @@ var setListStartNumber_1 = require("./publicApi/list/setListStartNumber");
|
|
|
52
52
|
Object.defineProperty(exports, "setListStartNumber", { enumerable: true, get: function () { return setListStartNumber_1.setListStartNumber; } });
|
|
53
53
|
var setIndentation_1 = require("./publicApi/block/setIndentation");
|
|
54
54
|
Object.defineProperty(exports, "setIndentation", { enumerable: true, get: function () { return setIndentation_1.setIndentation; } });
|
|
55
|
+
var insertHorizontalLine_1 = require("./publicApi/block/insertHorizontalLine");
|
|
56
|
+
Object.defineProperty(exports, "insertHorizontalLine", { enumerable: true, get: function () { return insertHorizontalLine_1.insertHorizontalLine; } });
|
|
55
57
|
var setAlignment_1 = require("./publicApi/block/setAlignment");
|
|
56
58
|
Object.defineProperty(exports, "setAlignment", { enumerable: true, get: function () { return setAlignment_1.setAlignment; } });
|
|
57
59
|
var setDirection_1 = require("./publicApi/block/setDirection");
|
|
@@ -66,6 +68,8 @@ var setImageBorder_1 = require("./publicApi/image/setImageBorder");
|
|
|
66
68
|
Object.defineProperty(exports, "setImageBorder", { enumerable: true, get: function () { return setImageBorder_1.setImageBorder; } });
|
|
67
69
|
var setImageBoxShadow_1 = require("./publicApi/image/setImageBoxShadow");
|
|
68
70
|
Object.defineProperty(exports, "setImageBoxShadow", { enumerable: true, get: function () { return setImageBoxShadow_1.setImageBoxShadow; } });
|
|
71
|
+
var setImageSize_1 = require("./publicApi/image/setImageSize");
|
|
72
|
+
Object.defineProperty(exports, "setImageSize", { enumerable: true, get: function () { return setImageSize_1.setImageSize; } });
|
|
69
73
|
var changeImage_1 = require("./publicApi/image/changeImage");
|
|
70
74
|
Object.defineProperty(exports, "changeImage", { enumerable: true, get: function () { return changeImage_1.changeImage; } });
|
|
71
75
|
var getFormatState_1 = require("./publicApi/format/getFormatState");
|
|
@@ -118,6 +122,8 @@ var findListItemsInSameThread_1 = require("./modelApi/list/findListItemsInSameTh
|
|
|
118
122
|
Object.defineProperty(exports, "findListItemsInSameThread", { enumerable: true, get: function () { return findListItemsInSameThread_1.findListItemsInSameThread; } });
|
|
119
123
|
var setModelIndentation_1 = require("./modelApi/block/setModelIndentation");
|
|
120
124
|
Object.defineProperty(exports, "setModelIndentation", { enumerable: true, get: function () { return setModelIndentation_1.setModelIndentation; } });
|
|
125
|
+
var insertHorizontalLineIntoModel_1 = require("./modelApi/block/insertHorizontalLineIntoModel");
|
|
126
|
+
Object.defineProperty(exports, "insertHorizontalLineIntoModel", { enumerable: true, get: function () { return insertHorizontalLineIntoModel_1.insertHorizontalLineIntoModel; } });
|
|
121
127
|
var setModelDirection_1 = require("./modelApi/block/setModelDirection");
|
|
122
128
|
Object.defineProperty(exports, "getTextDirection", { enumerable: true, get: function () { return setModelDirection_1.getTextDirection; } });
|
|
123
129
|
var matchLink_1 = require("./modelApi/link/matchLink");
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-api/lib/index.ts"],"names":[],"mappings":";;;;AAAA,6DAA4D;AAAnD,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,0GAAA,WAAW,OAAA;AACpB,yEAAwE;AAA/D,sHAAA,iBAAiB,OAAA;AAC1B,yDAAwD;AAA/C,sGAAA,SAAS,OAAA;AAClB,mFAAkF;AAAzE,gIAAA,sBAAsB,OAAA;AAC/B,8DAA6D;AAApD,4GA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AAAtE,0HAAA,mBAAmB,OAAA","sourcesContent":["export { insertTable } from './publicApi/table/insertTable';\nexport { formatTable } from './publicApi/table/formatTable';\nexport { setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { editTable } from './publicApi/table/editTable';\nexport { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { toggleBullet } from './publicApi/list/toggleBullet';\nexport { toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { toggleBold } from './publicApi/segment/toggleBold';\nexport { toggleItalic } from './publicApi/segment/toggleItalic';\nexport { toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { setFontName } from './publicApi/segment/setFontName';\nexport { setFontSize } from './publicApi/segment/setFontSize';\nexport { setTextColor } from './publicApi/segment/setTextColor';\nexport { changeFontSize } from './publicApi/segment/changeFontSize';\nexport { applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { splitTextSegment } from './publicApi/segment/splitTextSegment';\nexport { insertImage } from './publicApi/image/insertImage';\nexport { setListStyle } from './publicApi/list/setListStyle';\nexport { setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { setIndentation } from './publicApi/block/setIndentation';\nexport { setAlignment } from './publicApi/block/setAlignment';\nexport { setDirection } from './publicApi/block/setDirection';\nexport { setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { setSpacing } from './publicApi/block/setSpacing';\nexport { setImageBorder } from './publicApi/image/setImageBorder';\nexport { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { changeImage } from './publicApi/image/changeImage';\nexport { getFormatState } from './publicApi/format/getFormatState';\nexport { clearFormat } from './publicApi/format/clearFormat';\nexport { insertLink } from './publicApi/link/insertLink';\nexport { removeLink } from './publicApi/link/removeLink';\nexport { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { setImageAltText } from './publicApi/image/setImageAltText';\nexport { adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { toggleCode } from './publicApi/segment/toggleCode';\nexport { insertEntity } from './publicApi/entity/insertEntity';\nexport { insertTableRow } from './modelApi/table/insertTableRow';\nexport { insertTableColumn } from './modelApi/table/insertTableColumn';\nexport { clearSelectedCells } from './modelApi/table/clearSelectedCells';\n\nexport { createEditorContextForEntity } from './publicApi/utils/createEditorContextForEntity';\nexport { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';\nexport { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';\nexport { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';\nexport { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';\nexport { formatTextSegmentBeforeSelectionMarker } from './publicApi/utils/formatTextSegmentBeforeSelectionMarker';\nexport { formatInsertPointWithContentModel } from './publicApi/utils/formatInsertPointWithContentModel';\n\nexport { setListType } from './modelApi/list/setListType';\nexport { setModelListStyle } from './modelApi/list/setModelListStyle';\nexport { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';\nexport { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';\nexport { setModelIndentation } from './modelApi/block/setModelIndentation';\nexport { getTextDirection } from './modelApi/block/setModelDirection';\nexport { matchLink } from './modelApi/link/matchLink';\nexport { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';\nexport { getListAnnounceData } from './modelApi/list/getListAnnounceData';\nexport { queryContentModelBlocks } from './modelApi/common/queryContentModelBlocks';\nexport { adjustWordSelection } from './modelApi/selection/adjustWordSelection';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-api/lib/index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;AAChC,uFAAsF;AAA7E,sIAAA,yBAAyB,OAAA;AAClC,4EAA2E;AAAlE,0HAAA,mBAAmB,OAAA;AAC5B,gGAA+F;AAAtF,8IAAA,6BAA6B,OAAA;AACtC,wEAAsE;AAA7D,qHAAA,gBAAgB,OAAA;AACzB,uDAAsD;AAA7C,sGAAA,SAAS,OAAA;AAClB,2DAA0E;AAAjE,0GAAA,WAAW,OAAA;AAAE,6GAAA,cAAc,OAAA;AACpC,2EAA0E;AAAjE,0HAAA,mBAAmB,OAAA;AAC5B,qFAAoF;AAA3E,kIAAA,uBAAuB,OAAA;AAChC,gFAA+E;AAAtE,0HAAA,mBAAmB,OAAA","sourcesContent":["export { insertTable } from './publicApi/table/insertTable';\nexport { formatTable } from './publicApi/table/formatTable';\nexport { setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { editTable } from './publicApi/table/editTable';\nexport { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { toggleBullet } from './publicApi/list/toggleBullet';\nexport { toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { toggleBold } from './publicApi/segment/toggleBold';\nexport { toggleItalic } from './publicApi/segment/toggleItalic';\nexport { toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { setFontName } from './publicApi/segment/setFontName';\nexport { setFontSize } from './publicApi/segment/setFontSize';\nexport { setTextColor } from './publicApi/segment/setTextColor';\nexport { changeFontSize } from './publicApi/segment/changeFontSize';\nexport { applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { splitTextSegment } from './publicApi/segment/splitTextSegment';\nexport { insertImage } from './publicApi/image/insertImage';\nexport { setListStyle } from './publicApi/list/setListStyle';\nexport { setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { setIndentation } from './publicApi/block/setIndentation';\nexport { insertHorizontalLine } from './publicApi/block/insertHorizontalLine';\nexport { setAlignment } from './publicApi/block/setAlignment';\nexport { setDirection } from './publicApi/block/setDirection';\nexport { setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { setSpacing } from './publicApi/block/setSpacing';\nexport { setImageBorder } from './publicApi/image/setImageBorder';\nexport { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { setImageSize } from './publicApi/image/setImageSize';\nexport { changeImage } from './publicApi/image/changeImage';\nexport { getFormatState } from './publicApi/format/getFormatState';\nexport { clearFormat } from './publicApi/format/clearFormat';\nexport { insertLink } from './publicApi/link/insertLink';\nexport { removeLink } from './publicApi/link/removeLink';\nexport { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { setImageAltText } from './publicApi/image/setImageAltText';\nexport { adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { toggleCode } from './publicApi/segment/toggleCode';\nexport { insertEntity } from './publicApi/entity/insertEntity';\nexport { insertTableRow } from './modelApi/table/insertTableRow';\nexport { insertTableColumn } from './modelApi/table/insertTableColumn';\nexport { clearSelectedCells } from './modelApi/table/clearSelectedCells';\n\nexport { createEditorContextForEntity } from './publicApi/utils/createEditorContextForEntity';\nexport { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';\nexport { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';\nexport { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';\nexport { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';\nexport { formatTextSegmentBeforeSelectionMarker } from './publicApi/utils/formatTextSegmentBeforeSelectionMarker';\nexport { formatInsertPointWithContentModel } from './publicApi/utils/formatInsertPointWithContentModel';\n\nexport { setListType } from './modelApi/list/setListType';\nexport { setModelListStyle } from './modelApi/list/setModelListStyle';\nexport { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';\nexport { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';\nexport { setModelIndentation } from './modelApi/block/setModelIndentation';\nexport { insertHorizontalLineIntoModel } from './modelApi/block/insertHorizontalLineIntoModel';\nexport { getTextDirection } from './modelApi/block/setModelDirection';\nexport { matchLink } from './modelApi/link/matchLink';\nexport { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';\nexport { getListAnnounceData } from './modelApi/list/getListAnnounceData';\nexport { queryContentModelBlocks } from './modelApi/common/queryContentModelBlocks';\nexport { adjustWordSelection } from './modelApi/selection/adjustWordSelection';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ContentModelDividerFormat, FormatContentModelContext, ReadonlyContentModelDocument } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into the model at current selection
|
|
4
|
+
*/
|
|
5
|
+
export declare function insertHorizontalLineIntoModel(model: ReadonlyContentModelDocument, context: FormatContentModelContext, format?: ContentModelDividerFormat): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.insertHorizontalLineIntoModel = void 0;
|
|
4
|
+
var roosterjs_content_model_dom_1 = require("roosterjs-content-model-dom");
|
|
5
|
+
/**
|
|
6
|
+
* Insert a horizontal line into the model at current selection
|
|
7
|
+
*/
|
|
8
|
+
function insertHorizontalLineIntoModel(model, context, format) {
|
|
9
|
+
if (format === void 0) { format = {
|
|
10
|
+
borderTop: '1px solid',
|
|
11
|
+
borderRight: '1px solid',
|
|
12
|
+
borderBottom: '1px solid',
|
|
13
|
+
borderLeft: '1px solid',
|
|
14
|
+
width: '98%',
|
|
15
|
+
display: 'table',
|
|
16
|
+
height: '1px',
|
|
17
|
+
}; }
|
|
18
|
+
var doc = (0, roosterjs_content_model_dom_1.createContentModelDocument)();
|
|
19
|
+
(0, roosterjs_content_model_dom_1.addBlock)(doc, (0, roosterjs_content_model_dom_1.createDivider)('hr', format));
|
|
20
|
+
return !!(0, roosterjs_content_model_dom_1.mergeModel)(model, doc, context);
|
|
21
|
+
}
|
|
22
|
+
exports.insertHorizontalLineIntoModel = insertHorizontalLineIntoModel;
|
|
23
|
+
//# sourceMappingURL=insertHorizontalLineIntoModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertHorizontalLineIntoModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/block/insertHorizontalLineIntoModel.ts"],"names":[],"mappings":";;;AAAA,2EAKqC;AAOrC;;GAEG;AACH,SAAgB,6BAA6B,CACzC,KAAmC,EACnC,OAAkC,EAClC,MAQC;IARD,uBAAA,EAAA;QACI,SAAS,EAAE,WAAW;QACtB,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,WAAW;QACvB,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,KAAK;KAChB;IAED,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;IACzC,IAAA,sCAAQ,EAAC,GAAG,EAAE,IAAA,2CAAa,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAE3C,OAAO,CAAC,CAAC,IAAA,wCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAjBD,sEAiBC","sourcesContent":["import {\n addBlock,\n createContentModelDocument,\n createDivider,\n mergeModel,\n} from 'roosterjs-content-model-dom';\nimport type {\n ContentModelDividerFormat,\n FormatContentModelContext,\n ReadonlyContentModelDocument,\n} from 'roosterjs-content-model-types';\n\n/**\n * Insert a horizontal line into the model at current selection\n */\nexport function insertHorizontalLineIntoModel(\n model: ReadonlyContentModelDocument,\n context: FormatContentModelContext,\n format: ContentModelDividerFormat = {\n borderTop: '1px solid',\n borderRight: '1px solid',\n borderBottom: '1px solid',\n borderLeft: '1px solid',\n width: '98%',\n display: 'table',\n height: '1px',\n }\n): boolean {\n const doc = createContentModelDocument();\n addBlock(doc, createDivider('hr', format));\n\n return !!mergeModel(model, doc, context);\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ContentModelDividerFormat, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into editor at current selection, replacing selected content
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param format Optional divider format. Defaults to a thin solid line with 98% width
|
|
6
|
+
*/
|
|
7
|
+
export declare function insertHorizontalLine(editor: IEditor, format?: ContentModelDividerFormat): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.insertHorizontalLine = void 0;
|
|
4
|
+
var insertHorizontalLineIntoModel_1 = require("../../modelApi/block/insertHorizontalLineIntoModel");
|
|
5
|
+
/**
|
|
6
|
+
* Insert a horizontal line into editor at current selection, replacing selected content
|
|
7
|
+
* @param editor The editor instance
|
|
8
|
+
* @param format Optional divider format. Defaults to a thin solid line with 98% width
|
|
9
|
+
*/
|
|
10
|
+
function insertHorizontalLine(editor, format) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
editor.formatContentModel(function (model, context) { return (0, insertHorizontalLineIntoModel_1.insertHorizontalLineIntoModel)(model, context, format); }, {
|
|
13
|
+
apiName: 'insertHorizontalLine',
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
exports.insertHorizontalLine = insertHorizontalLine;
|
|
17
|
+
//# sourceMappingURL=insertHorizontalLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertHorizontalLine.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/block/insertHorizontalLine.ts"],"names":[],"mappings":";;;AAAA,oGAAmG;AAGnG;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,MAAe,EAAE,MAAkC;IACpF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO,IAAK,OAAA,IAAA,6DAA6B,EAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAArD,CAAqD,EACzE;QACI,OAAO,EAAE,sBAAsB;KAClC,CACJ,CAAC;AACN,CAAC;AATD,oDASC","sourcesContent":["import { insertHorizontalLineIntoModel } from '../../modelApi/block/insertHorizontalLineIntoModel';\nimport type { ContentModelDividerFormat, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Insert a horizontal line into editor at current selection, replacing selected content\n * @param editor The editor instance\n * @param format Optional divider format. Defaults to a thin solid line with 98% width\n */\nexport function insertHorizontalLine(editor: IEditor, format?: ContentModelDividerFormat) {\n editor.focus();\n\n editor.formatContentModel(\n (model, context) => insertHorizontalLineIntoModel(model, context, format),\n {\n apiName: 'insertHorizontalLine',\n }\n );\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set the width and height of all selected images.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param width The image width as a CSS value (e.g. "200px" or "50%"). An empty string clears the explicit width.
|
|
6
|
+
* @param height The image height as a CSS value (e.g. "100px" or "auto"). An empty string clears the explicit height.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setImageSize(editor: IEditor, width: string, height: string): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setImageSize = void 0;
|
|
4
|
+
var formatImageWithContentModel_1 = require("../utils/formatImageWithContentModel");
|
|
5
|
+
/**
|
|
6
|
+
* Set the width and height of all selected images.
|
|
7
|
+
* @param editor The editor instance
|
|
8
|
+
* @param width The image width as a CSS value (e.g. "200px" or "50%"). An empty string clears the explicit width.
|
|
9
|
+
* @param height The image height as a CSS value (e.g. "100px" or "auto"). An empty string clears the explicit height.
|
|
10
|
+
*/
|
|
11
|
+
function setImageSize(editor, width, height) {
|
|
12
|
+
editor.focus();
|
|
13
|
+
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'setImageSize', function (image) {
|
|
14
|
+
image.format.width = width;
|
|
15
|
+
image.format.height = height;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.setImageSize = setImageSize;
|
|
19
|
+
//# sourceMappingURL=setImageSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setImageSize.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageSize.ts"],"names":[],"mappings":";;;AAAA,oFAAmF;AAGnF;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,MAAe,EAAE,KAAa,EAAE,MAAc;IACvE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,IAAA,yDAA2B,EAAC,MAAM,EAAE,cAAc,EAAE,UAAA,KAAK;QACrD,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3B,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACjC,CAAC,CAAC,CAAC;AACP,CAAC;AAPD,oCAOC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set the width and height of all selected images.\n * @param editor The editor instance\n * @param width The image width as a CSS value (e.g. \"200px\" or \"50%\"). An empty string clears the explicit width.\n * @param height The image height as a CSS value (e.g. \"100px\" or \"auto\"). An empty string clears the explicit height.\n */\nexport function setImageSize(editor: IEditor, width: string, height: string) {\n editor.focus();\n\n formatImageWithContentModel(editor, 'setImageSize', image => {\n image.format.width = width;\n image.format.height = height;\n });\n}\n"]}
|
package/lib-amd/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { insertImage } from './publicApi/image/insertImage';
|
|
|
23
23
|
export { setListStyle } from './publicApi/list/setListStyle';
|
|
24
24
|
export { setListStartNumber } from './publicApi/list/setListStartNumber';
|
|
25
25
|
export { setIndentation } from './publicApi/block/setIndentation';
|
|
26
|
+
export { insertHorizontalLine } from './publicApi/block/insertHorizontalLine';
|
|
26
27
|
export { setAlignment } from './publicApi/block/setAlignment';
|
|
27
28
|
export { setDirection } from './publicApi/block/setDirection';
|
|
28
29
|
export { setHeadingLevel } from './publicApi/block/setHeadingLevel';
|
|
@@ -30,6 +31,7 @@ export { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
|
|
|
30
31
|
export { setSpacing } from './publicApi/block/setSpacing';
|
|
31
32
|
export { setImageBorder } from './publicApi/image/setImageBorder';
|
|
32
33
|
export { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
|
|
34
|
+
export { setImageSize } from './publicApi/image/setImageSize';
|
|
33
35
|
export { changeImage } from './publicApi/image/changeImage';
|
|
34
36
|
export { getFormatState } from './publicApi/format/getFormatState';
|
|
35
37
|
export { clearFormat } from './publicApi/format/clearFormat';
|
|
@@ -56,6 +58,7 @@ export { setModelListStyle } from './modelApi/list/setModelListStyle';
|
|
|
56
58
|
export { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';
|
|
57
59
|
export { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';
|
|
58
60
|
export { setModelIndentation } from './modelApi/block/setModelIndentation';
|
|
61
|
+
export { insertHorizontalLineIntoModel } from './modelApi/block/insertHorizontalLineIntoModel';
|
|
59
62
|
export { getTextDirection } from './modelApi/block/setModelDirection';
|
|
60
63
|
export { matchLink } from './modelApi/link/matchLink';
|
|
61
64
|
export { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';
|
package/lib-amd/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/table/formatTable", "./publicApi/table/setTableCellShade", "./publicApi/table/editTable", "./publicApi/table/applyTableBorderFormat", "./publicApi/list/toggleBullet", "./publicApi/list/toggleNumbering", "./publicApi/segment/toggleBold", "./publicApi/segment/toggleItalic", "./publicApi/segment/toggleUnderline", "./publicApi/segment/toggleStrikethrough", "./publicApi/segment/toggleSubscript", "./publicApi/segment/toggleSuperscript", "./publicApi/segment/setBackgroundColor", "./publicApi/segment/setFontName", "./publicApi/segment/setFontSize", "./publicApi/segment/setTextColor", "./publicApi/segment/changeFontSize", "./publicApi/segment/applySegmentFormat", "./publicApi/segment/changeCapitalization", "./publicApi/segment/splitTextSegment", "./publicApi/image/insertImage", "./publicApi/list/setListStyle", "./publicApi/list/setListStartNumber", "./publicApi/block/setIndentation", "./publicApi/block/setAlignment", "./publicApi/block/setDirection", "./publicApi/block/setHeadingLevel", "./publicApi/block/toggleBlockQuote", "./publicApi/block/setSpacing", "./publicApi/image/setImageBorder", "./publicApi/image/setImageBoxShadow", "./publicApi/image/changeImage", "./publicApi/format/getFormatState", "./publicApi/format/clearFormat", "./publicApi/link/insertLink", "./publicApi/link/removeLink", "./publicApi/link/adjustLinkSelection", "./publicApi/image/setImageAltText", "./publicApi/image/adjustImageSelection", "./publicApi/block/setParagraphMargin", "./publicApi/segment/toggleCode", "./publicApi/entity/insertEntity", "./modelApi/table/insertTableRow", "./modelApi/table/insertTableColumn", "./modelApi/table/clearSelectedCells", "./publicApi/utils/createEditorContextForEntity", "./publicApi/utils/formatTableWithContentModel", "./publicApi/utils/formatImageWithContentModel", "./publicApi/utils/formatParagraphWithContentModel", "./publicApi/utils/formatSegmentWithContentModel", "./publicApi/utils/formatTextSegmentBeforeSelectionMarker", "./publicApi/utils/formatInsertPointWithContentModel", "./modelApi/list/setListType", "./modelApi/list/setModelListStyle", "./modelApi/list/setModelListStartNumber", "./modelApi/list/findListItemsInSameThread", "./modelApi/block/setModelIndentation", "./modelApi/block/setModelDirection", "./modelApi/link/matchLink", "./modelApi/link/promoteLink", "./modelApi/list/getListAnnounceData", "./modelApi/common/queryContentModelBlocks", "./modelApi/selection/adjustWordSelection"], function (require, exports, insertTable_1, formatTable_1, setTableCellShade_1, editTable_1, applyTableBorderFormat_1, toggleBullet_1, toggleNumbering_1, toggleBold_1, toggleItalic_1, toggleUnderline_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, setBackgroundColor_1, setFontName_1, setFontSize_1, setTextColor_1, changeFontSize_1, applySegmentFormat_1, changeCapitalization_1, splitTextSegment_1, insertImage_1, setListStyle_1, setListStartNumber_1, setIndentation_1, setAlignment_1, setDirection_1, setHeadingLevel_1, toggleBlockQuote_1, setSpacing_1, setImageBorder_1, setImageBoxShadow_1, changeImage_1, getFormatState_1, clearFormat_1, insertLink_1, removeLink_1, adjustLinkSelection_1, setImageAltText_1, adjustImageSelection_1, setParagraphMargin_1, toggleCode_1, insertEntity_1, insertTableRow_1, insertTableColumn_1, clearSelectedCells_1, createEditorContextForEntity_1, formatTableWithContentModel_1, formatImageWithContentModel_1, formatParagraphWithContentModel_1, formatSegmentWithContentModel_1, formatTextSegmentBeforeSelectionMarker_1, formatInsertPointWithContentModel_1, setListType_1, setModelListStyle_1, setModelListStartNumber_1, findListItemsInSameThread_1, setModelIndentation_1, setModelDirection_1, matchLink_1, promoteLink_1, getListAnnounceData_1, queryContentModelBlocks_1, adjustWordSelection_1) {
|
|
1
|
+
define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/table/formatTable", "./publicApi/table/setTableCellShade", "./publicApi/table/editTable", "./publicApi/table/applyTableBorderFormat", "./publicApi/list/toggleBullet", "./publicApi/list/toggleNumbering", "./publicApi/segment/toggleBold", "./publicApi/segment/toggleItalic", "./publicApi/segment/toggleUnderline", "./publicApi/segment/toggleStrikethrough", "./publicApi/segment/toggleSubscript", "./publicApi/segment/toggleSuperscript", "./publicApi/segment/setBackgroundColor", "./publicApi/segment/setFontName", "./publicApi/segment/setFontSize", "./publicApi/segment/setTextColor", "./publicApi/segment/changeFontSize", "./publicApi/segment/applySegmentFormat", "./publicApi/segment/changeCapitalization", "./publicApi/segment/splitTextSegment", "./publicApi/image/insertImage", "./publicApi/list/setListStyle", "./publicApi/list/setListStartNumber", "./publicApi/block/setIndentation", "./publicApi/block/insertHorizontalLine", "./publicApi/block/setAlignment", "./publicApi/block/setDirection", "./publicApi/block/setHeadingLevel", "./publicApi/block/toggleBlockQuote", "./publicApi/block/setSpacing", "./publicApi/image/setImageBorder", "./publicApi/image/setImageBoxShadow", "./publicApi/image/setImageSize", "./publicApi/image/changeImage", "./publicApi/format/getFormatState", "./publicApi/format/clearFormat", "./publicApi/link/insertLink", "./publicApi/link/removeLink", "./publicApi/link/adjustLinkSelection", "./publicApi/image/setImageAltText", "./publicApi/image/adjustImageSelection", "./publicApi/block/setParagraphMargin", "./publicApi/segment/toggleCode", "./publicApi/entity/insertEntity", "./modelApi/table/insertTableRow", "./modelApi/table/insertTableColumn", "./modelApi/table/clearSelectedCells", "./publicApi/utils/createEditorContextForEntity", "./publicApi/utils/formatTableWithContentModel", "./publicApi/utils/formatImageWithContentModel", "./publicApi/utils/formatParagraphWithContentModel", "./publicApi/utils/formatSegmentWithContentModel", "./publicApi/utils/formatTextSegmentBeforeSelectionMarker", "./publicApi/utils/formatInsertPointWithContentModel", "./modelApi/list/setListType", "./modelApi/list/setModelListStyle", "./modelApi/list/setModelListStartNumber", "./modelApi/list/findListItemsInSameThread", "./modelApi/block/setModelIndentation", "./modelApi/block/insertHorizontalLineIntoModel", "./modelApi/block/setModelDirection", "./modelApi/link/matchLink", "./modelApi/link/promoteLink", "./modelApi/list/getListAnnounceData", "./modelApi/common/queryContentModelBlocks", "./modelApi/selection/adjustWordSelection"], function (require, exports, insertTable_1, formatTable_1, setTableCellShade_1, editTable_1, applyTableBorderFormat_1, toggleBullet_1, toggleNumbering_1, toggleBold_1, toggleItalic_1, toggleUnderline_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, setBackgroundColor_1, setFontName_1, setFontSize_1, setTextColor_1, changeFontSize_1, applySegmentFormat_1, changeCapitalization_1, splitTextSegment_1, insertImage_1, setListStyle_1, setListStartNumber_1, setIndentation_1, insertHorizontalLine_1, setAlignment_1, setDirection_1, setHeadingLevel_1, toggleBlockQuote_1, setSpacing_1, setImageBorder_1, setImageBoxShadow_1, setImageSize_1, changeImage_1, getFormatState_1, clearFormat_1, insertLink_1, removeLink_1, adjustLinkSelection_1, setImageAltText_1, adjustImageSelection_1, setParagraphMargin_1, toggleCode_1, insertEntity_1, insertTableRow_1, insertTableColumn_1, clearSelectedCells_1, createEditorContextForEntity_1, formatTableWithContentModel_1, formatImageWithContentModel_1, formatParagraphWithContentModel_1, formatSegmentWithContentModel_1, formatTextSegmentBeforeSelectionMarker_1, formatInsertPointWithContentModel_1, setListType_1, setModelListStyle_1, setModelListStartNumber_1, findListItemsInSameThread_1, setModelIndentation_1, insertHorizontalLineIntoModel_1, setModelDirection_1, matchLink_1, promoteLink_1, getListAnnounceData_1, queryContentModelBlocks_1, adjustWordSelection_1) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.adjustWordSelection = exports.queryContentModelBlocks = exports.getListAnnounceData = exports.getPromoteLink = exports.promoteLink = exports.matchLink = exports.getTextDirection = exports.setModelIndentation = exports.findListItemsInSameThread = exports.setModelListStartNumber = exports.setModelListStyle = exports.setListType = exports.formatInsertPointWithContentModel = exports.formatTextSegmentBeforeSelectionMarker = exports.formatSegmentWithContentModel = exports.formatParagraphWithContentModel = exports.formatImageWithContentModel = exports.formatTableWithContentModel = exports.createEditorContextForEntity = exports.clearSelectedCells = exports.insertTableColumn = exports.insertTableRow = 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.setListStartNumber = exports.setListStyle = exports.insertImage = exports.splitTextSegment = 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
|
+
exports.adjustWordSelection = exports.queryContentModelBlocks = exports.getListAnnounceData = exports.getPromoteLink = exports.promoteLink = exports.matchLink = exports.getTextDirection = exports.insertHorizontalLineIntoModel = exports.setModelIndentation = exports.findListItemsInSameThread = exports.setModelListStartNumber = exports.setModelListStyle = exports.setListType = exports.formatInsertPointWithContentModel = exports.formatTextSegmentBeforeSelectionMarker = exports.formatSegmentWithContentModel = exports.formatParagraphWithContentModel = exports.formatImageWithContentModel = exports.formatTableWithContentModel = exports.createEditorContextForEntity = exports.clearSelectedCells = exports.insertTableColumn = exports.insertTableRow = exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageSize = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.insertHorizontalLine = exports.setIndentation = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.splitTextSegment = 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;
|
|
5
5
|
Object.defineProperty(exports, "insertTable", { enumerable: true, get: function () { return insertTable_1.insertTable; } });
|
|
6
6
|
Object.defineProperty(exports, "formatTable", { enumerable: true, get: function () { return formatTable_1.formatTable; } });
|
|
7
7
|
Object.defineProperty(exports, "setTableCellShade", { enumerable: true, get: function () { return setTableCellShade_1.setTableCellShade; } });
|
|
@@ -27,6 +27,7 @@ define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/tabl
|
|
|
27
27
|
Object.defineProperty(exports, "setListStyle", { enumerable: true, get: function () { return setListStyle_1.setListStyle; } });
|
|
28
28
|
Object.defineProperty(exports, "setListStartNumber", { enumerable: true, get: function () { return setListStartNumber_1.setListStartNumber; } });
|
|
29
29
|
Object.defineProperty(exports, "setIndentation", { enumerable: true, get: function () { return setIndentation_1.setIndentation; } });
|
|
30
|
+
Object.defineProperty(exports, "insertHorizontalLine", { enumerable: true, get: function () { return insertHorizontalLine_1.insertHorizontalLine; } });
|
|
30
31
|
Object.defineProperty(exports, "setAlignment", { enumerable: true, get: function () { return setAlignment_1.setAlignment; } });
|
|
31
32
|
Object.defineProperty(exports, "setDirection", { enumerable: true, get: function () { return setDirection_1.setDirection; } });
|
|
32
33
|
Object.defineProperty(exports, "setHeadingLevel", { enumerable: true, get: function () { return setHeadingLevel_1.setHeadingLevel; } });
|
|
@@ -34,6 +35,7 @@ define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/tabl
|
|
|
34
35
|
Object.defineProperty(exports, "setSpacing", { enumerable: true, get: function () { return setSpacing_1.setSpacing; } });
|
|
35
36
|
Object.defineProperty(exports, "setImageBorder", { enumerable: true, get: function () { return setImageBorder_1.setImageBorder; } });
|
|
36
37
|
Object.defineProperty(exports, "setImageBoxShadow", { enumerable: true, get: function () { return setImageBoxShadow_1.setImageBoxShadow; } });
|
|
38
|
+
Object.defineProperty(exports, "setImageSize", { enumerable: true, get: function () { return setImageSize_1.setImageSize; } });
|
|
37
39
|
Object.defineProperty(exports, "changeImage", { enumerable: true, get: function () { return changeImage_1.changeImage; } });
|
|
38
40
|
Object.defineProperty(exports, "getFormatState", { enumerable: true, get: function () { return getFormatState_1.getFormatState; } });
|
|
39
41
|
Object.defineProperty(exports, "clearFormat", { enumerable: true, get: function () { return clearFormat_1.clearFormat; } });
|
|
@@ -60,6 +62,7 @@ define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/tabl
|
|
|
60
62
|
Object.defineProperty(exports, "setModelListStartNumber", { enumerable: true, get: function () { return setModelListStartNumber_1.setModelListStartNumber; } });
|
|
61
63
|
Object.defineProperty(exports, "findListItemsInSameThread", { enumerable: true, get: function () { return findListItemsInSameThread_1.findListItemsInSameThread; } });
|
|
62
64
|
Object.defineProperty(exports, "setModelIndentation", { enumerable: true, get: function () { return setModelIndentation_1.setModelIndentation; } });
|
|
65
|
+
Object.defineProperty(exports, "insertHorizontalLineIntoModel", { enumerable: true, get: function () { return insertHorizontalLineIntoModel_1.insertHorizontalLineIntoModel; } });
|
|
63
66
|
Object.defineProperty(exports, "getTextDirection", { enumerable: true, get: function () { return setModelDirection_1.getTextDirection; } });
|
|
64
67
|
Object.defineProperty(exports, "matchLink", { enumerable: true, get: function () { return matchLink_1.matchLink; } });
|
|
65
68
|
Object.defineProperty(exports, "promoteLink", { enumerable: true, get: function () { return promoteLink_1.promoteLink; } });
|
package/lib-amd/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-api/lib/index.ts"],"names":[],"mappings":";;;;IAAS,0GAAA,WAAW,OAAA;IACX,0GAAA,WAAW,OAAA;IACX,sHAAA,iBAAiB,OAAA;IACjB,sGAAA,SAAS,OAAA;IACT,gIAAA,sBAAsB,OAAA;IACtB,4GAAA,YAAY,OAAA;IACZ,kHAAA,eAAe,OAAA;IACf,wGAAA,UAAU,OAAA;IACV,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uBAAuB,OAAA;IACvB,sIAAA,yBAAyB,OAAA;IACzB,0HAAA,mBAAmB,OAAA;IACnB,qHAAA,gBAAgB,OAAA;IAChB,sGAAA,SAAS,OAAA;IACT,0GAAA,WAAW,OAAA;IAAE,6GAAA,cAAc,OAAA;IAC3B,0HAAA,mBAAmB,OAAA;IACnB,kIAAA,uBAAuB,OAAA;IACvB,0HAAA,mBAAmB,OAAA","sourcesContent":["export { insertTable } from './publicApi/table/insertTable';\nexport { formatTable } from './publicApi/table/formatTable';\nexport { setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { editTable } from './publicApi/table/editTable';\nexport { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { toggleBullet } from './publicApi/list/toggleBullet';\nexport { toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { toggleBold } from './publicApi/segment/toggleBold';\nexport { toggleItalic } from './publicApi/segment/toggleItalic';\nexport { toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { setFontName } from './publicApi/segment/setFontName';\nexport { setFontSize } from './publicApi/segment/setFontSize';\nexport { setTextColor } from './publicApi/segment/setTextColor';\nexport { changeFontSize } from './publicApi/segment/changeFontSize';\nexport { applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { splitTextSegment } from './publicApi/segment/splitTextSegment';\nexport { insertImage } from './publicApi/image/insertImage';\nexport { setListStyle } from './publicApi/list/setListStyle';\nexport { setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { setIndentation } from './publicApi/block/setIndentation';\nexport { setAlignment } from './publicApi/block/setAlignment';\nexport { setDirection } from './publicApi/block/setDirection';\nexport { setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { setSpacing } from './publicApi/block/setSpacing';\nexport { setImageBorder } from './publicApi/image/setImageBorder';\nexport { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { changeImage } from './publicApi/image/changeImage';\nexport { getFormatState } from './publicApi/format/getFormatState';\nexport { clearFormat } from './publicApi/format/clearFormat';\nexport { insertLink } from './publicApi/link/insertLink';\nexport { removeLink } from './publicApi/link/removeLink';\nexport { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { setImageAltText } from './publicApi/image/setImageAltText';\nexport { adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { toggleCode } from './publicApi/segment/toggleCode';\nexport { insertEntity } from './publicApi/entity/insertEntity';\nexport { insertTableRow } from './modelApi/table/insertTableRow';\nexport { insertTableColumn } from './modelApi/table/insertTableColumn';\nexport { clearSelectedCells } from './modelApi/table/clearSelectedCells';\n\nexport { createEditorContextForEntity } from './publicApi/utils/createEditorContextForEntity';\nexport { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';\nexport { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';\nexport { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';\nexport { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';\nexport { formatTextSegmentBeforeSelectionMarker } from './publicApi/utils/formatTextSegmentBeforeSelectionMarker';\nexport { formatInsertPointWithContentModel } from './publicApi/utils/formatInsertPointWithContentModel';\n\nexport { setListType } from './modelApi/list/setListType';\nexport { setModelListStyle } from './modelApi/list/setModelListStyle';\nexport { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';\nexport { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';\nexport { setModelIndentation } from './modelApi/block/setModelIndentation';\nexport { getTextDirection } from './modelApi/block/setModelDirection';\nexport { matchLink } from './modelApi/link/matchLink';\nexport { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';\nexport { getListAnnounceData } from './modelApi/list/getListAnnounceData';\nexport { queryContentModelBlocks } from './modelApi/common/queryContentModelBlocks';\nexport { adjustWordSelection } from './modelApi/selection/adjustWordSelection';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-api/lib/index.ts"],"names":[],"mappings":";;;;IAAS,0GAAA,WAAW,OAAA;IACX,0GAAA,WAAW,OAAA;IACX,sHAAA,iBAAiB,OAAA;IACjB,sGAAA,SAAS,OAAA;IACT,gIAAA,sBAAsB,OAAA;IACtB,4GAAA,YAAY,OAAA;IACZ,kHAAA,eAAe,OAAA;IACf,wGAAA,UAAU,OAAA;IACV,4GAAA,YAAY,OAAA;IACZ,kHAAA,eAAe,OAAA;IACf,0HAAA,mBAAmB,OAAA;IACnB,kHAAA,eAAe,OAAA;IACf,sHAAA,iBAAiB,OAAA;IACjB,wHAAA,kBAAkB,OAAA;IAClB,0GAAA,WAAW,OAAA;IACX,0GAAA,WAAW,OAAA;IACX,4GAAA,YAAY,OAAA;IACZ,gHAAA,cAAc,OAAA;IACd,wHAAA,kBAAkB,OAAA;IAClB,4HAAA,oBAAoB,OAAA;IACpB,oHAAA,gBAAgB,OAAA;IAChB,0GAAA,WAAW,OAAA;IACX,4GAAA,YAAY,OAAA;IACZ,wHAAA,kBAAkB,OAAA;IAClB,gHAAA,cAAc,OAAA;IACd,4HAAA,oBAAoB,OAAA;IACpB,4GAAA,YAAY,OAAA;IACZ,4GAAA,YAAY,OAAA;IACZ,kHAAA,eAAe,OAAA;IACf,oHAAA,gBAAgB,OAAA;IAChB,wGAAA,UAAU,OAAA;IACV,gHAAA,cAAc,OAAA;IACd,sHAAA,iBAAiB,OAAA;IACjB,4GAAA,YAAY,OAAA;IACZ,0GAAA,WAAW,OAAA;IACX,gHAAA,cAAc,OAAA;IACd,0GAAA,WAAW,OAAA;IACX,wGAAA,UAAU,OAAA;IACV,wGAAA,UAAU,OAAA;IACV,0HAAA,mBAAmB,OAAA;IACnB,kHAAA,eAAe,OAAA;IACf,4HAAA,oBAAoB,OAAA;IACpB,wHAAA,kBAAkB,OAAA;IAClB,wGAAA,UAAU,OAAA;IACV,4GAAA,YAAY,OAAA;IACZ,gHAAA,cAAc,OAAA;IACd,sHAAA,iBAAiB,OAAA;IACjB,wHAAA,kBAAkB,OAAA;IAElB,4IAAA,4BAA4B,OAAA;IAC5B,0IAAA,2BAA2B,OAAA;IAC3B,0IAAA,2BAA2B,OAAA;IAC3B,kJAAA,+BAA+B,OAAA;IAC/B,8IAAA,6BAA6B,OAAA;IAC7B,gKAAA,sCAAsC,OAAA;IACtC,sJAAA,iCAAiC,OAAA;IAEjC,0GAAA,WAAW,OAAA;IACX,sHAAA,iBAAiB,OAAA;IACjB,kIAAA,uBAAuB,OAAA;IACvB,sIAAA,yBAAyB,OAAA;IACzB,0HAAA,mBAAmB,OAAA;IACnB,8IAAA,6BAA6B,OAAA;IAC7B,qHAAA,gBAAgB,OAAA;IAChB,sGAAA,SAAS,OAAA;IACT,0GAAA,WAAW,OAAA;IAAE,6GAAA,cAAc,OAAA;IAC3B,0HAAA,mBAAmB,OAAA;IACnB,kIAAA,uBAAuB,OAAA;IACvB,0HAAA,mBAAmB,OAAA","sourcesContent":["export { insertTable } from './publicApi/table/insertTable';\nexport { formatTable } from './publicApi/table/formatTable';\nexport { setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { editTable } from './publicApi/table/editTable';\nexport { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { toggleBullet } from './publicApi/list/toggleBullet';\nexport { toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { toggleBold } from './publicApi/segment/toggleBold';\nexport { toggleItalic } from './publicApi/segment/toggleItalic';\nexport { toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { setFontName } from './publicApi/segment/setFontName';\nexport { setFontSize } from './publicApi/segment/setFontSize';\nexport { setTextColor } from './publicApi/segment/setTextColor';\nexport { changeFontSize } from './publicApi/segment/changeFontSize';\nexport { applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { splitTextSegment } from './publicApi/segment/splitTextSegment';\nexport { insertImage } from './publicApi/image/insertImage';\nexport { setListStyle } from './publicApi/list/setListStyle';\nexport { setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { setIndentation } from './publicApi/block/setIndentation';\nexport { insertHorizontalLine } from './publicApi/block/insertHorizontalLine';\nexport { setAlignment } from './publicApi/block/setAlignment';\nexport { setDirection } from './publicApi/block/setDirection';\nexport { setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { setSpacing } from './publicApi/block/setSpacing';\nexport { setImageBorder } from './publicApi/image/setImageBorder';\nexport { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { setImageSize } from './publicApi/image/setImageSize';\nexport { changeImage } from './publicApi/image/changeImage';\nexport { getFormatState } from './publicApi/format/getFormatState';\nexport { clearFormat } from './publicApi/format/clearFormat';\nexport { insertLink } from './publicApi/link/insertLink';\nexport { removeLink } from './publicApi/link/removeLink';\nexport { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { setImageAltText } from './publicApi/image/setImageAltText';\nexport { adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { toggleCode } from './publicApi/segment/toggleCode';\nexport { insertEntity } from './publicApi/entity/insertEntity';\nexport { insertTableRow } from './modelApi/table/insertTableRow';\nexport { insertTableColumn } from './modelApi/table/insertTableColumn';\nexport { clearSelectedCells } from './modelApi/table/clearSelectedCells';\n\nexport { createEditorContextForEntity } from './publicApi/utils/createEditorContextForEntity';\nexport { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';\nexport { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';\nexport { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';\nexport { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';\nexport { formatTextSegmentBeforeSelectionMarker } from './publicApi/utils/formatTextSegmentBeforeSelectionMarker';\nexport { formatInsertPointWithContentModel } from './publicApi/utils/formatInsertPointWithContentModel';\n\nexport { setListType } from './modelApi/list/setListType';\nexport { setModelListStyle } from './modelApi/list/setModelListStyle';\nexport { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';\nexport { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';\nexport { setModelIndentation } from './modelApi/block/setModelIndentation';\nexport { insertHorizontalLineIntoModel } from './modelApi/block/insertHorizontalLineIntoModel';\nexport { getTextDirection } from './modelApi/block/setModelDirection';\nexport { matchLink } from './modelApi/link/matchLink';\nexport { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';\nexport { getListAnnounceData } from './modelApi/list/getListAnnounceData';\nexport { queryContentModelBlocks } from './modelApi/common/queryContentModelBlocks';\nexport { adjustWordSelection } from './modelApi/selection/adjustWordSelection';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ContentModelDividerFormat, FormatContentModelContext, ReadonlyContentModelDocument } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into the model at current selection
|
|
4
|
+
*/
|
|
5
|
+
export declare function insertHorizontalLineIntoModel(model: ReadonlyContentModelDocument, context: FormatContentModelContext, format?: ContentModelDividerFormat): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
define(["require", "exports", "roosterjs-content-model-dom"], function (require, exports, roosterjs_content_model_dom_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.insertHorizontalLineIntoModel = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Insert a horizontal line into the model at current selection
|
|
7
|
+
*/
|
|
8
|
+
function insertHorizontalLineIntoModel(model, context, format) {
|
|
9
|
+
if (format === void 0) { format = {
|
|
10
|
+
borderTop: '1px solid',
|
|
11
|
+
borderRight: '1px solid',
|
|
12
|
+
borderBottom: '1px solid',
|
|
13
|
+
borderLeft: '1px solid',
|
|
14
|
+
width: '98%',
|
|
15
|
+
display: 'table',
|
|
16
|
+
height: '1px',
|
|
17
|
+
}; }
|
|
18
|
+
var doc = (0, roosterjs_content_model_dom_1.createContentModelDocument)();
|
|
19
|
+
(0, roosterjs_content_model_dom_1.addBlock)(doc, (0, roosterjs_content_model_dom_1.createDivider)('hr', format));
|
|
20
|
+
return !!(0, roosterjs_content_model_dom_1.mergeModel)(model, doc, context);
|
|
21
|
+
}
|
|
22
|
+
exports.insertHorizontalLineIntoModel = insertHorizontalLineIntoModel;
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=insertHorizontalLineIntoModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertHorizontalLineIntoModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/block/insertHorizontalLineIntoModel.ts"],"names":[],"mappings":";;;;IAYA;;OAEG;IACH,SAAgB,6BAA6B,CACzC,KAAmC,EACnC,OAAkC,EAClC,MAQC;QARD,uBAAA,EAAA;YACI,SAAS,EAAE,WAAW;YACtB,WAAW,EAAE,WAAW;YACxB,YAAY,EAAE,WAAW;YACzB,UAAU,EAAE,WAAW;YACvB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE,KAAK;SAChB;QAED,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;QACzC,IAAA,sCAAQ,EAAC,GAAG,EAAE,IAAA,2CAAa,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QAE3C,OAAO,CAAC,CAAC,IAAA,wCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAjBD,sEAiBC","sourcesContent":["import {\n addBlock,\n createContentModelDocument,\n createDivider,\n mergeModel,\n} from 'roosterjs-content-model-dom';\nimport type {\n ContentModelDividerFormat,\n FormatContentModelContext,\n ReadonlyContentModelDocument,\n} from 'roosterjs-content-model-types';\n\n/**\n * Insert a horizontal line into the model at current selection\n */\nexport function insertHorizontalLineIntoModel(\n model: ReadonlyContentModelDocument,\n context: FormatContentModelContext,\n format: ContentModelDividerFormat = {\n borderTop: '1px solid',\n borderRight: '1px solid',\n borderBottom: '1px solid',\n borderLeft: '1px solid',\n width: '98%',\n display: 'table',\n height: '1px',\n }\n): boolean {\n const doc = createContentModelDocument();\n addBlock(doc, createDivider('hr', format));\n\n return !!mergeModel(model, doc, context);\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ContentModelDividerFormat, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into editor at current selection, replacing selected content
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param format Optional divider format. Defaults to a thin solid line with 98% width
|
|
6
|
+
*/
|
|
7
|
+
export declare function insertHorizontalLine(editor: IEditor, format?: ContentModelDividerFormat): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
define(["require", "exports", "../../modelApi/block/insertHorizontalLineIntoModel"], function (require, exports, insertHorizontalLineIntoModel_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.insertHorizontalLine = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Insert a horizontal line into editor at current selection, replacing selected content
|
|
7
|
+
* @param editor The editor instance
|
|
8
|
+
* @param format Optional divider format. Defaults to a thin solid line with 98% width
|
|
9
|
+
*/
|
|
10
|
+
function insertHorizontalLine(editor, format) {
|
|
11
|
+
editor.focus();
|
|
12
|
+
editor.formatContentModel(function (model, context) { return (0, insertHorizontalLineIntoModel_1.insertHorizontalLineIntoModel)(model, context, format); }, {
|
|
13
|
+
apiName: 'insertHorizontalLine',
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
exports.insertHorizontalLine = insertHorizontalLine;
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=insertHorizontalLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertHorizontalLine.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/block/insertHorizontalLine.ts"],"names":[],"mappings":";;;;IAGA;;;;OAIG;IACH,SAAgB,oBAAoB,CAAC,MAAe,EAAE,MAAkC;QACpF,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO,IAAK,OAAA,IAAA,6DAA6B,EAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAArD,CAAqD,EACzE;YACI,OAAO,EAAE,sBAAsB;SAClC,CACJ,CAAC;IACN,CAAC;IATD,oDASC","sourcesContent":["import { insertHorizontalLineIntoModel } from '../../modelApi/block/insertHorizontalLineIntoModel';\nimport type { ContentModelDividerFormat, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Insert a horizontal line into editor at current selection, replacing selected content\n * @param editor The editor instance\n * @param format Optional divider format. Defaults to a thin solid line with 98% width\n */\nexport function insertHorizontalLine(editor: IEditor, format?: ContentModelDividerFormat) {\n editor.focus();\n\n editor.formatContentModel(\n (model, context) => insertHorizontalLineIntoModel(model, context, format),\n {\n apiName: 'insertHorizontalLine',\n }\n );\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set the width and height of all selected images.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param width The image width as a CSS value (e.g. "200px" or "50%"). An empty string clears the explicit width.
|
|
6
|
+
* @param height The image height as a CSS value (e.g. "100px" or "auto"). An empty string clears the explicit height.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setImageSize(editor: IEditor, width: string, height: string): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
define(["require", "exports", "../utils/formatImageWithContentModel"], function (require, exports, formatImageWithContentModel_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.setImageSize = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Set the width and height of all selected images.
|
|
7
|
+
* @param editor The editor instance
|
|
8
|
+
* @param width The image width as a CSS value (e.g. "200px" or "50%"). An empty string clears the explicit width.
|
|
9
|
+
* @param height The image height as a CSS value (e.g. "100px" or "auto"). An empty string clears the explicit height.
|
|
10
|
+
*/
|
|
11
|
+
function setImageSize(editor, width, height) {
|
|
12
|
+
editor.focus();
|
|
13
|
+
(0, formatImageWithContentModel_1.formatImageWithContentModel)(editor, 'setImageSize', function (image) {
|
|
14
|
+
image.format.width = width;
|
|
15
|
+
image.format.height = height;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.setImageSize = setImageSize;
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=setImageSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setImageSize.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageSize.ts"],"names":[],"mappings":";;;;IAGA;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,MAAe,EAAE,KAAa,EAAE,MAAc;QACvE,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAA,yDAA2B,EAAC,MAAM,EAAE,cAAc,EAAE,UAAA,KAAK;YACrD,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;YAC3B,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC;IACP,CAAC;IAPD,oCAOC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set the width and height of all selected images.\n * @param editor The editor instance\n * @param width The image width as a CSS value (e.g. \"200px\" or \"50%\"). An empty string clears the explicit width.\n * @param height The image height as a CSS value (e.g. \"100px\" or \"auto\"). An empty string clears the explicit height.\n */\nexport function setImageSize(editor: IEditor, width: string, height: string) {\n editor.focus();\n\n formatImageWithContentModel(editor, 'setImageSize', image => {\n image.format.width = width;\n image.format.height = height;\n });\n}\n"]}
|
package/lib-mjs/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { insertImage } from './publicApi/image/insertImage';
|
|
|
23
23
|
export { setListStyle } from './publicApi/list/setListStyle';
|
|
24
24
|
export { setListStartNumber } from './publicApi/list/setListStartNumber';
|
|
25
25
|
export { setIndentation } from './publicApi/block/setIndentation';
|
|
26
|
+
export { insertHorizontalLine } from './publicApi/block/insertHorizontalLine';
|
|
26
27
|
export { setAlignment } from './publicApi/block/setAlignment';
|
|
27
28
|
export { setDirection } from './publicApi/block/setDirection';
|
|
28
29
|
export { setHeadingLevel } from './publicApi/block/setHeadingLevel';
|
|
@@ -30,6 +31,7 @@ export { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
|
|
|
30
31
|
export { setSpacing } from './publicApi/block/setSpacing';
|
|
31
32
|
export { setImageBorder } from './publicApi/image/setImageBorder';
|
|
32
33
|
export { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
|
|
34
|
+
export { setImageSize } from './publicApi/image/setImageSize';
|
|
33
35
|
export { changeImage } from './publicApi/image/changeImage';
|
|
34
36
|
export { getFormatState } from './publicApi/format/getFormatState';
|
|
35
37
|
export { clearFormat } from './publicApi/format/clearFormat';
|
|
@@ -56,6 +58,7 @@ export { setModelListStyle } from './modelApi/list/setModelListStyle';
|
|
|
56
58
|
export { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';
|
|
57
59
|
export { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';
|
|
58
60
|
export { setModelIndentation } from './modelApi/block/setModelIndentation';
|
|
61
|
+
export { insertHorizontalLineIntoModel } from './modelApi/block/insertHorizontalLineIntoModel';
|
|
59
62
|
export { getTextDirection } from './modelApi/block/setModelDirection';
|
|
60
63
|
export { matchLink } from './modelApi/link/matchLink';
|
|
61
64
|
export { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';
|
package/lib-mjs/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export { insertImage } from './publicApi/image/insertImage';
|
|
|
23
23
|
export { setListStyle } from './publicApi/list/setListStyle';
|
|
24
24
|
export { setListStartNumber } from './publicApi/list/setListStartNumber';
|
|
25
25
|
export { setIndentation } from './publicApi/block/setIndentation';
|
|
26
|
+
export { insertHorizontalLine } from './publicApi/block/insertHorizontalLine';
|
|
26
27
|
export { setAlignment } from './publicApi/block/setAlignment';
|
|
27
28
|
export { setDirection } from './publicApi/block/setDirection';
|
|
28
29
|
export { setHeadingLevel } from './publicApi/block/setHeadingLevel';
|
|
@@ -30,6 +31,7 @@ export { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
|
|
|
30
31
|
export { setSpacing } from './publicApi/block/setSpacing';
|
|
31
32
|
export { setImageBorder } from './publicApi/image/setImageBorder';
|
|
32
33
|
export { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
|
|
34
|
+
export { setImageSize } from './publicApi/image/setImageSize';
|
|
33
35
|
export { changeImage } from './publicApi/image/changeImage';
|
|
34
36
|
export { getFormatState } from './publicApi/format/getFormatState';
|
|
35
37
|
export { clearFormat } from './publicApi/format/clearFormat';
|
|
@@ -56,6 +58,7 @@ export { setModelListStyle } from './modelApi/list/setModelListStyle';
|
|
|
56
58
|
export { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';
|
|
57
59
|
export { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';
|
|
58
60
|
export { setModelIndentation } from './modelApi/block/setModelIndentation';
|
|
61
|
+
export { insertHorizontalLineIntoModel } from './modelApi/block/insertHorizontalLineIntoModel';
|
|
59
62
|
export { getTextDirection } from './modelApi/block/setModelDirection';
|
|
60
63
|
export { matchLink } from './modelApi/link/matchLink';
|
|
61
64
|
export { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';
|
package/lib-mjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-api/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAi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AM,2CAA2C,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC","sourcesContent":["export { insertTable } from './publicApi/table/insertTable';\nexport { formatTable } from './publicApi/table/formatTable';\nexport { setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { editTable } from './publicApi/table/editTable';\nexport { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { toggleBullet } from './publicApi/list/toggleBullet';\nexport { toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { toggleBold } from './publicApi/segment/toggleBold';\nexport { toggleItalic } from './publicApi/segment/toggleItalic';\nexport { toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { setFontName } from './publicApi/segment/setFontName';\nexport { setFontSize } from './publicApi/segment/setFontSize';\nexport { setTextColor } from './publicApi/segment/setTextColor';\nexport { changeFontSize } from './publicApi/segment/changeFontSize';\nexport { applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { splitTextSegment } from './publicApi/segment/splitTextSegment';\nexport { insertImage } from './publicApi/image/insertImage';\nexport { setListStyle } from './publicApi/list/setListStyle';\nexport { setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { setIndentation } from './publicApi/block/setIndentation';\nexport { setAlignment } from './publicApi/block/setAlignment';\nexport { setDirection } from './publicApi/block/setDirection';\nexport { setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { setSpacing } from './publicApi/block/setSpacing';\nexport { setImageBorder } from './publicApi/image/setImageBorder';\nexport { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { changeImage } from './publicApi/image/changeImage';\nexport { getFormatState } from './publicApi/format/getFormatState';\nexport { clearFormat } from './publicApi/format/clearFormat';\nexport { insertLink } from './publicApi/link/insertLink';\nexport { removeLink } from './publicApi/link/removeLink';\nexport { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { setImageAltText } from './publicApi/image/setImageAltText';\nexport { adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { toggleCode } from './publicApi/segment/toggleCode';\nexport { insertEntity } from './publicApi/entity/insertEntity';\nexport { insertTableRow } from './modelApi/table/insertTableRow';\nexport { insertTableColumn } from './modelApi/table/insertTableColumn';\nexport { clearSelectedCells } from './modelApi/table/clearSelectedCells';\n\nexport { createEditorContextForEntity } from './publicApi/utils/createEditorContextForEntity';\nexport { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';\nexport { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';\nexport { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';\nexport { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';\nexport { formatTextSegmentBeforeSelectionMarker } from './publicApi/utils/formatTextSegmentBeforeSelectionMarker';\nexport { formatInsertPointWithContentModel } from './publicApi/utils/formatInsertPointWithContentModel';\n\nexport { setListType } from './modelApi/list/setListType';\nexport { setModelListStyle } from './modelApi/list/setModelListStyle';\nexport { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';\nexport { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';\nexport { setModelIndentation } from './modelApi/block/setModelIndentation';\nexport { getTextDirection } from './modelApi/block/setModelDirection';\nexport { matchLink } from './modelApi/link/matchLink';\nexport { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';\nexport { getListAnnounceData } from './modelApi/list/getListAnnounceData';\nexport { queryContentModelBlocks } from './modelApi/common/queryContentModelBlocks';\nexport { adjustWordSelection } from './modelApi/selection/adjustWordSelection';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","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AAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,sCAAsC,EAAE,MAAM,0DAA0D,CAAC;AAClH,OAAO,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AAExG,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC","sourcesContent":["export { insertTable } from './publicApi/table/insertTable';\nexport { formatTable } from './publicApi/table/formatTable';\nexport { setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { editTable } from './publicApi/table/editTable';\nexport { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { toggleBullet } from './publicApi/list/toggleBullet';\nexport { toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { toggleBold } from './publicApi/segment/toggleBold';\nexport { toggleItalic } from './publicApi/segment/toggleItalic';\nexport { toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { setFontName } from './publicApi/segment/setFontName';\nexport { setFontSize } from './publicApi/segment/setFontSize';\nexport { setTextColor } from './publicApi/segment/setTextColor';\nexport { changeFontSize } from './publicApi/segment/changeFontSize';\nexport { applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { splitTextSegment } from './publicApi/segment/splitTextSegment';\nexport { insertImage } from './publicApi/image/insertImage';\nexport { setListStyle } from './publicApi/list/setListStyle';\nexport { setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { setIndentation } from './publicApi/block/setIndentation';\nexport { insertHorizontalLine } from './publicApi/block/insertHorizontalLine';\nexport { setAlignment } from './publicApi/block/setAlignment';\nexport { setDirection } from './publicApi/block/setDirection';\nexport { setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { setSpacing } from './publicApi/block/setSpacing';\nexport { setImageBorder } from './publicApi/image/setImageBorder';\nexport { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { setImageSize } from './publicApi/image/setImageSize';\nexport { changeImage } from './publicApi/image/changeImage';\nexport { getFormatState } from './publicApi/format/getFormatState';\nexport { clearFormat } from './publicApi/format/clearFormat';\nexport { insertLink } from './publicApi/link/insertLink';\nexport { removeLink } from './publicApi/link/removeLink';\nexport { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { setImageAltText } from './publicApi/image/setImageAltText';\nexport { adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { toggleCode } from './publicApi/segment/toggleCode';\nexport { insertEntity } from './publicApi/entity/insertEntity';\nexport { insertTableRow } from './modelApi/table/insertTableRow';\nexport { insertTableColumn } from './modelApi/table/insertTableColumn';\nexport { clearSelectedCells } from './modelApi/table/clearSelectedCells';\n\nexport { createEditorContextForEntity } from './publicApi/utils/createEditorContextForEntity';\nexport { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';\nexport { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';\nexport { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';\nexport { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';\nexport { formatTextSegmentBeforeSelectionMarker } from './publicApi/utils/formatTextSegmentBeforeSelectionMarker';\nexport { formatInsertPointWithContentModel } from './publicApi/utils/formatInsertPointWithContentModel';\n\nexport { setListType } from './modelApi/list/setListType';\nexport { setModelListStyle } from './modelApi/list/setModelListStyle';\nexport { setModelListStartNumber } from './modelApi/list/setModelListStartNumber';\nexport { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';\nexport { setModelIndentation } from './modelApi/block/setModelIndentation';\nexport { insertHorizontalLineIntoModel } from './modelApi/block/insertHorizontalLineIntoModel';\nexport { getTextDirection } from './modelApi/block/setModelDirection';\nexport { matchLink } from './modelApi/link/matchLink';\nexport { promoteLink, getPromoteLink } from './modelApi/link/promoteLink';\nexport { getListAnnounceData } from './modelApi/list/getListAnnounceData';\nexport { queryContentModelBlocks } from './modelApi/common/queryContentModelBlocks';\nexport { adjustWordSelection } from './modelApi/selection/adjustWordSelection';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ContentModelDividerFormat, FormatContentModelContext, ReadonlyContentModelDocument } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into the model at current selection
|
|
4
|
+
*/
|
|
5
|
+
export declare function insertHorizontalLineIntoModel(model: ReadonlyContentModelDocument, context: FormatContentModelContext, format?: ContentModelDividerFormat): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { addBlock, createContentModelDocument, createDivider, mergeModel, } from 'roosterjs-content-model-dom';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into the model at current selection
|
|
4
|
+
*/
|
|
5
|
+
export function insertHorizontalLineIntoModel(model, context, format) {
|
|
6
|
+
if (format === void 0) { format = {
|
|
7
|
+
borderTop: '1px solid',
|
|
8
|
+
borderRight: '1px solid',
|
|
9
|
+
borderBottom: '1px solid',
|
|
10
|
+
borderLeft: '1px solid',
|
|
11
|
+
width: '98%',
|
|
12
|
+
display: 'table',
|
|
13
|
+
height: '1px',
|
|
14
|
+
}; }
|
|
15
|
+
var doc = createContentModelDocument();
|
|
16
|
+
addBlock(doc, createDivider('hr', format));
|
|
17
|
+
return !!mergeModel(model, doc, context);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=insertHorizontalLineIntoModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertHorizontalLineIntoModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/block/insertHorizontalLineIntoModel.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,0BAA0B,EAC1B,aAAa,EACb,UAAU,GACb,MAAM,6BAA6B,CAAC;AAOrC;;GAEG;AACH,MAAM,UAAU,6BAA6B,CACzC,KAAmC,EACnC,OAAkC,EAClC,MAQC;IARD,uBAAA,EAAA;QACI,SAAS,EAAE,WAAW;QACtB,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,WAAW;QACvB,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,KAAK;KAChB;IAED,IAAM,GAAG,GAAG,0BAA0B,EAAE,CAAC;IACzC,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAE3C,OAAO,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import {\n addBlock,\n createContentModelDocument,\n createDivider,\n mergeModel,\n} from 'roosterjs-content-model-dom';\nimport type {\n ContentModelDividerFormat,\n FormatContentModelContext,\n ReadonlyContentModelDocument,\n} from 'roosterjs-content-model-types';\n\n/**\n * Insert a horizontal line into the model at current selection\n */\nexport function insertHorizontalLineIntoModel(\n model: ReadonlyContentModelDocument,\n context: FormatContentModelContext,\n format: ContentModelDividerFormat = {\n borderTop: '1px solid',\n borderRight: '1px solid',\n borderBottom: '1px solid',\n borderLeft: '1px solid',\n width: '98%',\n display: 'table',\n height: '1px',\n }\n): boolean {\n const doc = createContentModelDocument();\n addBlock(doc, createDivider('hr', format));\n\n return !!mergeModel(model, doc, context);\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ContentModelDividerFormat, IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into editor at current selection, replacing selected content
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param format Optional divider format. Defaults to a thin solid line with 98% width
|
|
6
|
+
*/
|
|
7
|
+
export declare function insertHorizontalLine(editor: IEditor, format?: ContentModelDividerFormat): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { insertHorizontalLineIntoModel } from '../../modelApi/block/insertHorizontalLineIntoModel';
|
|
2
|
+
/**
|
|
3
|
+
* Insert a horizontal line into editor at current selection, replacing selected content
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param format Optional divider format. Defaults to a thin solid line with 98% width
|
|
6
|
+
*/
|
|
7
|
+
export function insertHorizontalLine(editor, format) {
|
|
8
|
+
editor.focus();
|
|
9
|
+
editor.formatContentModel(function (model, context) { return insertHorizontalLineIntoModel(model, context, format); }, {
|
|
10
|
+
apiName: 'insertHorizontalLine',
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=insertHorizontalLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertHorizontalLine.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/block/insertHorizontalLine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAGnG;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAe,EAAE,MAAkC;IACpF,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO,IAAK,OAAA,6BAA6B,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAArD,CAAqD,EACzE;QACI,OAAO,EAAE,sBAAsB;KAClC,CACJ,CAAC;AACN,CAAC","sourcesContent":["import { insertHorizontalLineIntoModel } from '../../modelApi/block/insertHorizontalLineIntoModel';\nimport type { ContentModelDividerFormat, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Insert a horizontal line into editor at current selection, replacing selected content\n * @param editor The editor instance\n * @param format Optional divider format. Defaults to a thin solid line with 98% width\n */\nexport function insertHorizontalLine(editor: IEditor, format?: ContentModelDividerFormat) {\n editor.focus();\n\n editor.formatContentModel(\n (model, context) => insertHorizontalLineIntoModel(model, context, format),\n {\n apiName: 'insertHorizontalLine',\n }\n );\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IEditor } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Set the width and height of all selected images.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param width The image width as a CSS value (e.g. "200px" or "50%"). An empty string clears the explicit width.
|
|
6
|
+
* @param height The image height as a CSS value (e.g. "100px" or "auto"). An empty string clears the explicit height.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setImageSize(editor: IEditor, width: string, height: string): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';
|
|
2
|
+
/**
|
|
3
|
+
* Set the width and height of all selected images.
|
|
4
|
+
* @param editor The editor instance
|
|
5
|
+
* @param width The image width as a CSS value (e.g. "200px" or "50%"). An empty string clears the explicit width.
|
|
6
|
+
* @param height The image height as a CSS value (e.g. "100px" or "auto"). An empty string clears the explicit height.
|
|
7
|
+
*/
|
|
8
|
+
export function setImageSize(editor, width, height) {
|
|
9
|
+
editor.focus();
|
|
10
|
+
formatImageWithContentModel(editor, 'setImageSize', function (image) {
|
|
11
|
+
image.format.width = width;
|
|
12
|
+
image.format.height = height;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=setImageSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setImageSize.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/image/setImageSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAGnF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAe,EAAE,KAAa,EAAE,MAAc;IACvE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,2BAA2B,CAAC,MAAM,EAAE,cAAc,EAAE,UAAA,KAAK;QACrD,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3B,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACjC,CAAC,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { formatImageWithContentModel } from '../utils/formatImageWithContentModel';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set the width and height of all selected images.\n * @param editor The editor instance\n * @param width The image width as a CSS value (e.g. \"200px\" or \"50%\"). An empty string clears the explicit width.\n * @param height The image height as a CSS value (e.g. \"100px\" or \"auto\"). An empty string clears the explicit height.\n */\nexport function setImageSize(editor: IEditor, width: string, height: string) {\n editor.focus();\n\n formatImageWithContentModel(editor, 'setImageSize', image => {\n image.format.width = width;\n image.format.height = height;\n });\n}\n"]}
|
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"description": "Format API for roosterjs",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.3.1",
|
|
6
|
-
"roosterjs-content-model-dom": "^9.
|
|
7
|
-
"roosterjs-content-model-types": "^9.
|
|
6
|
+
"roosterjs-content-model-dom": "^9.63.0",
|
|
7
|
+
"roosterjs-content-model-types": "^9.63.0"
|
|
8
8
|
},
|
|
9
|
-
"version": "9.
|
|
9
|
+
"version": "9.63.0",
|
|
10
10
|
"main": "./lib/index.js",
|
|
11
11
|
"typings": "./lib/index.d.ts",
|
|
12
12
|
"module": "./lib-mjs/index.js",
|