roosterjs-content-model-api 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (712) hide show
  1. package/lib/index.d.ts +48 -42
  2. package/lib/index.js +99 -87
  3. package/lib/index.js.map +1 -1
  4. package/lib/modelApi/block/setModelAlignment.d.ts +5 -5
  5. package/lib/modelApi/block/setModelAlignment.js +62 -62
  6. package/lib/modelApi/block/setModelAlignment.js.map +1 -1
  7. package/lib/modelApi/block/setModelDirection.d.ts +5 -5
  8. package/lib/modelApi/block/setModelDirection.js +68 -69
  9. package/lib/modelApi/block/setModelDirection.js.map +1 -1
  10. package/lib/modelApi/block/setModelIndentation.d.ts +8 -5
  11. package/lib/modelApi/block/setModelIndentation.js +138 -47
  12. package/lib/modelApi/block/setModelIndentation.js.map +1 -1
  13. package/lib/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
  14. package/lib/modelApi/block/toggleModelBlockQuote.js +50 -48
  15. package/lib/modelApi/block/toggleModelBlockQuote.js.map +1 -1
  16. package/lib/modelApi/common/clearModelFormat.d.ts +5 -5
  17. package/lib/modelApi/common/clearModelFormat.js +129 -129
  18. package/lib/modelApi/common/clearModelFormat.js.map +1 -1
  19. package/lib/modelApi/common/wrapBlock.d.ts +16 -16
  20. package/lib/modelApi/common/wrapBlock.js +48 -44
  21. package/lib/modelApi/common/wrapBlock.js.map +1 -1
  22. package/lib/modelApi/entity/insertEntityModel.d.ts +5 -5
  23. package/lib/modelApi/entity/insertEntityModel.js +79 -75
  24. package/lib/modelApi/entity/insertEntityModel.js.map +1 -1
  25. package/lib/modelApi/image/applyImageBorderFormat.d.ts +5 -5
  26. package/lib/modelApi/image/applyImageBorderFormat.js +57 -57
  27. package/lib/modelApi/image/applyImageBorderFormat.js.map +1 -1
  28. package/lib/modelApi/link/matchLink.d.ts +29 -0
  29. package/lib/modelApi/link/matchLink.js +95 -0
  30. package/lib/modelApi/link/matchLink.js.map +1 -0
  31. package/lib/modelApi/list/findListItemsInSameThread.d.ts +7 -5
  32. package/lib/modelApi/list/findListItemsInSameThread.js +114 -112
  33. package/lib/modelApi/list/findListItemsInSameThread.js.map +1 -1
  34. package/lib/modelApi/list/setListType.d.ts +7 -5
  35. package/lib/modelApi/list/setListType.js +113 -116
  36. package/lib/modelApi/list/setListType.js.map +1 -1
  37. package/lib/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
  38. package/lib/modelApi/selection/adjustSegmentSelection.js +47 -47
  39. package/lib/modelApi/selection/adjustSegmentSelection.js.map +1 -1
  40. package/lib/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
  41. package/lib/modelApi/selection/adjustTrailingSpaceSelection.js +55 -55
  42. package/lib/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
  43. package/lib/modelApi/selection/adjustWordSelection.d.ts +5 -5
  44. package/lib/modelApi/selection/adjustWordSelection.js +121 -121
  45. package/lib/modelApi/selection/adjustWordSelection.js.map +1 -1
  46. package/lib/modelApi/selection/collapseTableSelection.d.ts +5 -5
  47. package/lib/modelApi/selection/collapseTableSelection.js +16 -16
  48. package/lib/modelApi/selection/collapseTableSelection.js.map +1 -1
  49. package/lib/modelApi/table/alignTable.d.ts +5 -5
  50. package/lib/modelApi/table/alignTable.js +12 -12
  51. package/lib/modelApi/table/alignTable.js.map +1 -1
  52. package/lib/modelApi/table/alignTableCell.d.ts +9 -9
  53. package/lib/modelApi/table/alignTableCell.js +58 -58
  54. package/lib/modelApi/table/alignTableCell.js.map +1 -1
  55. package/lib/modelApi/table/canMergeCells.d.ts +5 -5
  56. package/lib/modelApi/table/canMergeCells.js +56 -56
  57. package/lib/modelApi/table/canMergeCells.js.map +1 -1
  58. package/lib/modelApi/table/clearSelectedCells.d.ts +8 -0
  59. package/lib/modelApi/table/clearSelectedCells.js +27 -0
  60. package/lib/modelApi/table/clearSelectedCells.js.map +1 -0
  61. package/lib/modelApi/table/createTableStructure.d.ts +5 -5
  62. package/lib/modelApi/table/createTableStructure.js +19 -19
  63. package/lib/modelApi/table/createTableStructure.js.map +1 -1
  64. package/lib/modelApi/table/deleteTable.d.ts +5 -5
  65. package/lib/modelApi/table/deleteTable.js +11 -11
  66. package/lib/modelApi/table/deleteTable.js.map +1 -1
  67. package/lib/modelApi/table/deleteTableColumn.d.ts +5 -5
  68. package/lib/modelApi/table/deleteTableColumn.js +24 -24
  69. package/lib/modelApi/table/deleteTableColumn.js.map +1 -1
  70. package/lib/modelApi/table/deleteTableRow.d.ts +5 -5
  71. package/lib/modelApi/table/deleteTableRow.js +23 -23
  72. package/lib/modelApi/table/deleteTableRow.js.map +1 -1
  73. package/lib/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
  74. package/lib/modelApi/table/ensureFocusableParagraphForTable.js +56 -56
  75. package/lib/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
  76. package/lib/modelApi/table/insertTableColumn.d.ts +7 -5
  77. package/lib/modelApi/table/insertTableColumn.js +28 -22
  78. package/lib/modelApi/table/insertTableColumn.js.map +1 -1
  79. package/lib/modelApi/table/insertTableRow.d.ts +7 -5
  80. package/lib/modelApi/table/insertTableRow.js +32 -26
  81. package/lib/modelApi/table/insertTableRow.js.map +1 -1
  82. package/lib/modelApi/table/mergeTableCells.d.ts +5 -5
  83. package/lib/modelApi/table/mergeTableCells.js +26 -26
  84. package/lib/modelApi/table/mergeTableCells.js.map +1 -1
  85. package/lib/modelApi/table/mergeTableColumn.d.ts +5 -5
  86. package/lib/modelApi/table/mergeTableColumn.js +37 -37
  87. package/lib/modelApi/table/mergeTableColumn.js.map +1 -1
  88. package/lib/modelApi/table/mergeTableRow.d.ts +5 -5
  89. package/lib/modelApi/table/mergeTableRow.js +38 -38
  90. package/lib/modelApi/table/mergeTableRow.js.map +1 -1
  91. package/lib/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
  92. package/lib/modelApi/table/splitTableCellHorizontally.js +54 -54
  93. package/lib/modelApi/table/splitTableCellHorizontally.js.map +1 -1
  94. package/lib/modelApi/table/splitTableCellVertically.d.ts +5 -5
  95. package/lib/modelApi/table/splitTableCellVertically.js +57 -57
  96. package/lib/modelApi/table/splitTableCellVertically.js.map +1 -1
  97. package/lib/publicApi/block/setAlignment.d.ts +7 -7
  98. package/lib/publicApi/block/setAlignment.js +15 -15
  99. package/lib/publicApi/block/setAlignment.js.map +1 -1
  100. package/lib/publicApi/block/setDirection.d.ts +7 -7
  101. package/lib/publicApi/block/setDirection.js +15 -15
  102. package/lib/publicApi/block/setDirection.js.map +1 -1
  103. package/lib/publicApi/block/setHeadingLevel.d.ts +7 -7
  104. package/lib/publicApi/block/setHeadingLevel.js +49 -49
  105. package/lib/publicApi/block/setHeadingLevel.js.map +1 -1
  106. package/lib/publicApi/block/setIndentation.d.ts +8 -8
  107. package/lib/publicApi/block/setIndentation.js +24 -24
  108. package/lib/publicApi/block/setIndentation.js.map +1 -1
  109. package/lib/publicApi/block/setParagraphMargin.d.ts +9 -9
  110. package/lib/publicApi/block/setParagraphMargin.js +32 -32
  111. package/lib/publicApi/block/setParagraphMargin.js.map +1 -1
  112. package/lib/publicApi/block/setSpacing.d.ts +7 -7
  113. package/lib/publicApi/block/setSpacing.js +20 -20
  114. package/lib/publicApi/block/setSpacing.js.map +1 -1
  115. package/lib/publicApi/block/toggleBlockQuote.d.ts +9 -9
  116. package/lib/publicApi/block/toggleBlockQuote.js +38 -34
  117. package/lib/publicApi/block/toggleBlockQuote.js.map +1 -1
  118. package/lib/publicApi/entity/insertEntity.d.ts +25 -25
  119. package/lib/publicApi/entity/insertEntity.js +41 -40
  120. package/lib/publicApi/entity/insertEntity.js.map +1 -1
  121. package/lib/publicApi/format/clearFormat.d.ts +6 -6
  122. package/lib/publicApi/format/clearFormat.js +22 -22
  123. package/lib/publicApi/format/clearFormat.js.map +1 -1
  124. package/lib/publicApi/format/getFormatState.d.ts +6 -26
  125. package/lib/publicApi/format/getFormatState.js +20 -88
  126. package/lib/publicApi/format/getFormatState.js.map +1 -1
  127. package/lib/publicApi/image/adjustImageSelection.d.ts +6 -6
  128. package/lib/publicApi/image/adjustImageSelection.js +25 -25
  129. package/lib/publicApi/image/adjustImageSelection.js.map +1 -1
  130. package/lib/publicApi/image/changeImage.d.ts +7 -7
  131. package/lib/publicApi/image/changeImage.js +34 -34
  132. package/lib/publicApi/image/changeImage.js.map +1 -1
  133. package/lib/publicApi/image/insertImage.d.ts +7 -7
  134. package/lib/publicApi/image/insertImage.js +36 -36
  135. package/lib/publicApi/image/insertImage.js.map +1 -1
  136. package/lib/publicApi/image/setImageAltText.d.ts +8 -8
  137. package/lib/publicApi/image/setImageAltText.js +16 -16
  138. package/lib/publicApi/image/setImageAltText.js.map +1 -1
  139. package/lib/publicApi/image/setImageBorder.d.ts +9 -9
  140. package/lib/publicApi/image/setImageBorder.js +18 -18
  141. package/lib/publicApi/image/setImageBorder.js.map +1 -1
  142. package/lib/publicApi/image/setImageBoxShadow.d.ts +8 -8
  143. package/lib/publicApi/image/setImageBoxShadow.js +28 -28
  144. package/lib/publicApi/image/setImageBoxShadow.js.map +1 -1
  145. package/lib/publicApi/link/adjustLinkSelection.d.ts +6 -6
  146. package/lib/publicApi/link/adjustLinkSelection.js +33 -33
  147. package/lib/publicApi/link/adjustLinkSelection.js.map +1 -1
  148. package/lib/publicApi/link/insertLink.d.ts +15 -15
  149. package/lib/publicApi/link/insertLink.js +119 -128
  150. package/lib/publicApi/link/insertLink.js.map +1 -1
  151. package/lib/publicApi/link/removeLink.d.ts +8 -8
  152. package/lib/publicApi/link/removeLink.js +31 -31
  153. package/lib/publicApi/link/removeLink.js.map +1 -1
  154. package/lib/publicApi/list/setListStartNumber.d.ts +7 -7
  155. package/lib/publicApi/list/setListStartNumber.js +25 -25
  156. package/lib/publicApi/list/setListStartNumber.js.map +1 -1
  157. package/lib/publicApi/list/setListStyle.d.ts +7 -7
  158. package/lib/publicApi/list/setListStyle.js +32 -32
  159. package/lib/publicApi/list/setListStyle.js.map +1 -1
  160. package/lib/publicApi/list/toggleBullet.d.ts +8 -8
  161. package/lib/publicApi/list/toggleBullet.js +19 -19
  162. package/lib/publicApi/list/toggleBullet.js.map +1 -1
  163. package/lib/publicApi/list/toggleNumbering.d.ts +8 -8
  164. package/lib/publicApi/list/toggleNumbering.js +19 -19
  165. package/lib/publicApi/list/toggleNumbering.js.map +1 -1
  166. package/lib/publicApi/segment/applySegmentFormat.d.ts +7 -7
  167. package/lib/publicApi/segment/applySegmentFormat.js +22 -22
  168. package/lib/publicApi/segment/applySegmentFormat.js.map +1 -1
  169. package/lib/publicApi/segment/changeCapitalization.d.ts +10 -10
  170. package/lib/publicApi/segment/changeCapitalization.js +48 -49
  171. package/lib/publicApi/segment/changeCapitalization.js.map +1 -1
  172. package/lib/publicApi/segment/changeFontSize.d.ts +8 -8
  173. package/lib/publicApi/segment/changeFontSize.js +61 -61
  174. package/lib/publicApi/segment/changeFontSize.js.map +1 -1
  175. package/lib/publicApi/segment/setBackgroundColor.d.ts +7 -7
  176. package/lib/publicApi/segment/setBackgroundColor.js +35 -35
  177. package/lib/publicApi/segment/setBackgroundColor.js.map +1 -1
  178. package/lib/publicApi/segment/setFontName.d.ts +7 -7
  179. package/lib/publicApi/segment/setFontName.js +18 -18
  180. package/lib/publicApi/segment/setFontName.js.map +1 -1
  181. package/lib/publicApi/segment/setFontSize.d.ts +12 -12
  182. package/lib/publicApi/segment/setFontSize.js +33 -33
  183. package/lib/publicApi/segment/setFontSize.js.map +1 -1
  184. package/lib/publicApi/segment/setTextColor.d.ts +7 -7
  185. package/lib/publicApi/segment/setTextColor.js +25 -25
  186. package/lib/publicApi/segment/setTextColor.js.map +1 -1
  187. package/lib/publicApi/segment/toggleBold.d.ts +6 -6
  188. package/lib/publicApi/segment/toggleBold.js +20 -20
  189. package/lib/publicApi/segment/toggleBold.js.map +1 -1
  190. package/lib/publicApi/segment/toggleCode.d.ts +6 -6
  191. package/lib/publicApi/segment/toggleCode.js +27 -27
  192. package/lib/publicApi/segment/toggleCode.js.map +1 -1
  193. package/lib/publicApi/segment/toggleItalic.d.ts +6 -6
  194. package/lib/publicApi/segment/toggleItalic.js +14 -14
  195. package/lib/publicApi/segment/toggleItalic.js.map +1 -1
  196. package/lib/publicApi/segment/toggleStrikethrough.d.ts +6 -6
  197. package/lib/publicApi/segment/toggleStrikethrough.js +14 -14
  198. package/lib/publicApi/segment/toggleStrikethrough.js.map +1 -1
  199. package/lib/publicApi/segment/toggleSubscript.d.ts +6 -6
  200. package/lib/publicApi/segment/toggleSubscript.js +14 -14
  201. package/lib/publicApi/segment/toggleSubscript.js.map +1 -1
  202. package/lib/publicApi/segment/toggleSuperscript.d.ts +6 -6
  203. package/lib/publicApi/segment/toggleSuperscript.js +14 -14
  204. package/lib/publicApi/segment/toggleSuperscript.js.map +1 -1
  205. package/lib/publicApi/segment/toggleUnderline.d.ts +6 -6
  206. package/lib/publicApi/segment/toggleUnderline.js +18 -18
  207. package/lib/publicApi/segment/toggleUnderline.js.map +1 -1
  208. package/lib/publicApi/table/applyTableBorderFormat.d.ts +8 -8
  209. package/lib/publicApi/table/applyTableBorderFormat.js +293 -293
  210. package/lib/publicApi/table/applyTableBorderFormat.js.map +1 -1
  211. package/lib/publicApi/table/editTable.d.ts +7 -7
  212. package/lib/publicApi/table/editTable.js +77 -102
  213. package/lib/publicApi/table/editTable.js.map +1 -1
  214. package/lib/publicApi/table/formatTable.d.ts +8 -8
  215. package/lib/publicApi/table/formatTable.js +37 -37
  216. package/lib/publicApi/table/formatTable.js.map +1 -1
  217. package/lib/publicApi/table/insertTable.d.ts +11 -11
  218. package/lib/publicApi/table/insertTable.js +46 -46
  219. package/lib/publicApi/table/insertTable.js.map +1 -1
  220. package/lib/publicApi/table/setTableCellShade.d.ts +7 -7
  221. package/lib/publicApi/table/setTableCellShade.js +32 -32
  222. package/lib/publicApi/table/setTableCellShade.js.map +1 -1
  223. package/lib/publicApi/utils/formatImageWithContentModel.d.ts +5 -5
  224. package/lib/publicApi/utils/formatImageWithContentModel.js +14 -14
  225. package/lib/publicApi/utils/formatImageWithContentModel.js.map +1 -1
  226. package/lib/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
  227. package/lib/publicApi/utils/formatParagraphWithContentModel.js +18 -18
  228. package/lib/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
  229. package/lib/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
  230. package/lib/publicApi/utils/formatSegmentWithContentModel.js +46 -46
  231. package/lib/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
  232. package/lib/publicApi/utils/formatTableWithContentModel.d.ts +9 -0
  233. package/lib/publicApi/utils/formatTableWithContentModel.js +44 -0
  234. package/lib/publicApi/utils/formatTableWithContentModel.js.map +1 -0
  235. package/lib-amd/index.d.ts +48 -42
  236. package/lib-amd/index.js +53 -47
  237. package/lib-amd/index.js.map +1 -1
  238. package/lib-amd/modelApi/block/setModelAlignment.d.ts +5 -5
  239. package/lib-amd/modelApi/block/setModelAlignment.js +62 -62
  240. package/lib-amd/modelApi/block/setModelAlignment.js.map +1 -1
  241. package/lib-amd/modelApi/block/setModelDirection.d.ts +5 -5
  242. package/lib-amd/modelApi/block/setModelDirection.js +68 -69
  243. package/lib-amd/modelApi/block/setModelDirection.js.map +1 -1
  244. package/lib-amd/modelApi/block/setModelIndentation.d.ts +8 -5
  245. package/lib-amd/modelApi/block/setModelIndentation.js +137 -47
  246. package/lib-amd/modelApi/block/setModelIndentation.js.map +1 -1
  247. package/lib-amd/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
  248. package/lib-amd/modelApi/block/toggleModelBlockQuote.js +49 -47
  249. package/lib-amd/modelApi/block/toggleModelBlockQuote.js.map +1 -1
  250. package/lib-amd/modelApi/common/clearModelFormat.d.ts +5 -5
  251. package/lib-amd/modelApi/common/clearModelFormat.js +127 -127
  252. package/lib-amd/modelApi/common/clearModelFormat.js.map +1 -1
  253. package/lib-amd/modelApi/common/wrapBlock.d.ts +16 -16
  254. package/lib-amd/modelApi/common/wrapBlock.js +48 -44
  255. package/lib-amd/modelApi/common/wrapBlock.js.map +1 -1
  256. package/lib-amd/modelApi/entity/insertEntityModel.d.ts +5 -5
  257. package/lib-amd/modelApi/entity/insertEntityModel.js +78 -74
  258. package/lib-amd/modelApi/entity/insertEntityModel.js.map +1 -1
  259. package/lib-amd/modelApi/image/applyImageBorderFormat.d.ts +5 -5
  260. package/lib-amd/modelApi/image/applyImageBorderFormat.js +57 -57
  261. package/lib-amd/modelApi/image/applyImageBorderFormat.js.map +1 -1
  262. package/lib-amd/modelApi/link/matchLink.d.ts +29 -0
  263. package/lib-amd/modelApi/link/matchLink.js +95 -0
  264. package/lib-amd/modelApi/link/matchLink.js.map +1 -0
  265. package/lib-amd/modelApi/list/findListItemsInSameThread.d.ts +7 -5
  266. package/lib-amd/modelApi/list/findListItemsInSameThread.js +116 -114
  267. package/lib-amd/modelApi/list/findListItemsInSameThread.js.map +1 -1
  268. package/lib-amd/modelApi/list/setListType.d.ts +7 -5
  269. package/lib-amd/modelApi/list/setListType.js +113 -116
  270. package/lib-amd/modelApi/list/setListType.js.map +1 -1
  271. package/lib-amd/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
  272. package/lib-amd/modelApi/selection/adjustSegmentSelection.js +48 -48
  273. package/lib-amd/modelApi/selection/adjustSegmentSelection.js.map +1 -1
  274. package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
  275. package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js +54 -54
  276. package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
  277. package/lib-amd/modelApi/selection/adjustWordSelection.d.ts +5 -5
  278. package/lib-amd/modelApi/selection/adjustWordSelection.js +120 -120
  279. package/lib-amd/modelApi/selection/adjustWordSelection.js.map +1 -1
  280. package/lib-amd/modelApi/selection/collapseTableSelection.d.ts +5 -5
  281. package/lib-amd/modelApi/selection/collapseTableSelection.js +17 -17
  282. package/lib-amd/modelApi/selection/collapseTableSelection.js.map +1 -1
  283. package/lib-amd/modelApi/table/alignTable.d.ts +5 -5
  284. package/lib-amd/modelApi/table/alignTable.js +14 -14
  285. package/lib-amd/modelApi/table/alignTable.js.map +1 -1
  286. package/lib-amd/modelApi/table/alignTableCell.d.ts +9 -9
  287. package/lib-amd/modelApi/table/alignTableCell.js +59 -59
  288. package/lib-amd/modelApi/table/alignTableCell.js.map +1 -1
  289. package/lib-amd/modelApi/table/canMergeCells.d.ts +5 -5
  290. package/lib-amd/modelApi/table/canMergeCells.js +58 -58
  291. package/lib-amd/modelApi/table/canMergeCells.js.map +1 -1
  292. package/lib-amd/modelApi/table/clearSelectedCells.d.ts +8 -0
  293. package/lib-amd/modelApi/table/clearSelectedCells.js +28 -0
  294. package/lib-amd/modelApi/table/clearSelectedCells.js.map +1 -0
  295. package/lib-amd/modelApi/table/createTableStructure.d.ts +5 -5
  296. package/lib-amd/modelApi/table/createTableStructure.js +20 -20
  297. package/lib-amd/modelApi/table/createTableStructure.js.map +1 -1
  298. package/lib-amd/modelApi/table/deleteTable.d.ts +5 -5
  299. package/lib-amd/modelApi/table/deleteTable.js +13 -13
  300. package/lib-amd/modelApi/table/deleteTable.js.map +1 -1
  301. package/lib-amd/modelApi/table/deleteTableColumn.d.ts +5 -5
  302. package/lib-amd/modelApi/table/deleteTableColumn.js +24 -24
  303. package/lib-amd/modelApi/table/deleteTableColumn.js.map +1 -1
  304. package/lib-amd/modelApi/table/deleteTableRow.d.ts +5 -5
  305. package/lib-amd/modelApi/table/deleteTableRow.js +23 -23
  306. package/lib-amd/modelApi/table/deleteTableRow.js.map +1 -1
  307. package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
  308. package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js +57 -57
  309. package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
  310. package/lib-amd/modelApi/table/insertTableColumn.d.ts +7 -5
  311. package/lib-amd/modelApi/table/insertTableColumn.js +27 -22
  312. package/lib-amd/modelApi/table/insertTableColumn.js.map +1 -1
  313. package/lib-amd/modelApi/table/insertTableRow.d.ts +7 -5
  314. package/lib-amd/modelApi/table/insertTableRow.js +30 -25
  315. package/lib-amd/modelApi/table/insertTableRow.js.map +1 -1
  316. package/lib-amd/modelApi/table/mergeTableCells.d.ts +5 -5
  317. package/lib-amd/modelApi/table/mergeTableCells.js +26 -26
  318. package/lib-amd/modelApi/table/mergeTableCells.js.map +1 -1
  319. package/lib-amd/modelApi/table/mergeTableColumn.d.ts +5 -5
  320. package/lib-amd/modelApi/table/mergeTableColumn.js +37 -37
  321. package/lib-amd/modelApi/table/mergeTableColumn.js.map +1 -1
  322. package/lib-amd/modelApi/table/mergeTableRow.d.ts +5 -5
  323. package/lib-amd/modelApi/table/mergeTableRow.js +38 -38
  324. package/lib-amd/modelApi/table/mergeTableRow.js.map +1 -1
  325. package/lib-amd/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
  326. package/lib-amd/modelApi/table/splitTableCellHorizontally.js +53 -53
  327. package/lib-amd/modelApi/table/splitTableCellHorizontally.js.map +1 -1
  328. package/lib-amd/modelApi/table/splitTableCellVertically.d.ts +5 -5
  329. package/lib-amd/modelApi/table/splitTableCellVertically.js +56 -56
  330. package/lib-amd/modelApi/table/splitTableCellVertically.js.map +1 -1
  331. package/lib-amd/publicApi/block/setAlignment.d.ts +7 -7
  332. package/lib-amd/publicApi/block/setAlignment.js +16 -16
  333. package/lib-amd/publicApi/block/setAlignment.js.map +1 -1
  334. package/lib-amd/publicApi/block/setDirection.d.ts +7 -7
  335. package/lib-amd/publicApi/block/setDirection.js +16 -16
  336. package/lib-amd/publicApi/block/setDirection.js.map +1 -1
  337. package/lib-amd/publicApi/block/setHeadingLevel.d.ts +7 -7
  338. package/lib-amd/publicApi/block/setHeadingLevel.js +50 -50
  339. package/lib-amd/publicApi/block/setHeadingLevel.js.map +1 -1
  340. package/lib-amd/publicApi/block/setIndentation.d.ts +8 -8
  341. package/lib-amd/publicApi/block/setIndentation.js +24 -24
  342. package/lib-amd/publicApi/block/setIndentation.js.map +1 -1
  343. package/lib-amd/publicApi/block/setParagraphMargin.d.ts +9 -9
  344. package/lib-amd/publicApi/block/setParagraphMargin.js +32 -32
  345. package/lib-amd/publicApi/block/setParagraphMargin.js.map +1 -1
  346. package/lib-amd/publicApi/block/setSpacing.d.ts +7 -7
  347. package/lib-amd/publicApi/block/setSpacing.js +21 -21
  348. package/lib-amd/publicApi/block/setSpacing.js.map +1 -1
  349. package/lib-amd/publicApi/block/toggleBlockQuote.d.ts +9 -9
  350. package/lib-amd/publicApi/block/toggleBlockQuote.js +38 -34
  351. package/lib-amd/publicApi/block/toggleBlockQuote.js.map +1 -1
  352. package/lib-amd/publicApi/entity/insertEntity.d.ts +25 -25
  353. package/lib-amd/publicApi/entity/insertEntity.js +40 -39
  354. package/lib-amd/publicApi/entity/insertEntity.js.map +1 -1
  355. package/lib-amd/publicApi/format/clearFormat.d.ts +6 -6
  356. package/lib-amd/publicApi/format/clearFormat.js +22 -22
  357. package/lib-amd/publicApi/format/clearFormat.js.map +1 -1
  358. package/lib-amd/publicApi/format/getFormatState.d.ts +6 -26
  359. package/lib-amd/publicApi/format/getFormatState.js +21 -86
  360. package/lib-amd/publicApi/format/getFormatState.js.map +1 -1
  361. package/lib-amd/publicApi/image/adjustImageSelection.d.ts +6 -6
  362. package/lib-amd/publicApi/image/adjustImageSelection.js +26 -26
  363. package/lib-amd/publicApi/image/adjustImageSelection.js.map +1 -1
  364. package/lib-amd/publicApi/image/changeImage.d.ts +7 -7
  365. package/lib-amd/publicApi/image/changeImage.js +34 -34
  366. package/lib-amd/publicApi/image/changeImage.js.map +1 -1
  367. package/lib-amd/publicApi/image/insertImage.d.ts +7 -7
  368. package/lib-amd/publicApi/image/insertImage.js +36 -36
  369. package/lib-amd/publicApi/image/insertImage.js.map +1 -1
  370. package/lib-amd/publicApi/image/setImageAltText.d.ts +8 -8
  371. package/lib-amd/publicApi/image/setImageAltText.js +17 -17
  372. package/lib-amd/publicApi/image/setImageAltText.js.map +1 -1
  373. package/lib-amd/publicApi/image/setImageBorder.d.ts +9 -9
  374. package/lib-amd/publicApi/image/setImageBorder.js +18 -18
  375. package/lib-amd/publicApi/image/setImageBorder.js.map +1 -1
  376. package/lib-amd/publicApi/image/setImageBoxShadow.d.ts +8 -8
  377. package/lib-amd/publicApi/image/setImageBoxShadow.js +29 -29
  378. package/lib-amd/publicApi/image/setImageBoxShadow.js.map +1 -1
  379. package/lib-amd/publicApi/link/adjustLinkSelection.d.ts +6 -6
  380. package/lib-amd/publicApi/link/adjustLinkSelection.js +32 -32
  381. package/lib-amd/publicApi/link/adjustLinkSelection.js.map +1 -1
  382. package/lib-amd/publicApi/link/insertLink.d.ts +15 -15
  383. package/lib-amd/publicApi/link/insertLink.js +116 -125
  384. package/lib-amd/publicApi/link/insertLink.js.map +1 -1
  385. package/lib-amd/publicApi/link/removeLink.d.ts +8 -8
  386. package/lib-amd/publicApi/link/removeLink.js +31 -31
  387. package/lib-amd/publicApi/link/removeLink.js.map +1 -1
  388. package/lib-amd/publicApi/list/setListStartNumber.d.ts +7 -7
  389. package/lib-amd/publicApi/list/setListStartNumber.js +26 -26
  390. package/lib-amd/publicApi/list/setListStartNumber.js.map +1 -1
  391. package/lib-amd/publicApi/list/setListStyle.d.ts +7 -7
  392. package/lib-amd/publicApi/list/setListStyle.js +32 -32
  393. package/lib-amd/publicApi/list/setListStyle.js.map +1 -1
  394. package/lib-amd/publicApi/list/toggleBullet.d.ts +8 -8
  395. package/lib-amd/publicApi/list/toggleBullet.js +20 -20
  396. package/lib-amd/publicApi/list/toggleBullet.js.map +1 -1
  397. package/lib-amd/publicApi/list/toggleNumbering.d.ts +8 -8
  398. package/lib-amd/publicApi/list/toggleNumbering.js +20 -20
  399. package/lib-amd/publicApi/list/toggleNumbering.js.map +1 -1
  400. package/lib-amd/publicApi/segment/applySegmentFormat.d.ts +7 -7
  401. package/lib-amd/publicApi/segment/applySegmentFormat.js +23 -23
  402. package/lib-amd/publicApi/segment/applySegmentFormat.js.map +1 -1
  403. package/lib-amd/publicApi/segment/changeCapitalization.d.ts +10 -10
  404. package/lib-amd/publicApi/segment/changeCapitalization.js +49 -50
  405. package/lib-amd/publicApi/segment/changeCapitalization.js.map +1 -1
  406. package/lib-amd/publicApi/segment/changeFontSize.d.ts +8 -8
  407. package/lib-amd/publicApi/segment/changeFontSize.js +60 -60
  408. package/lib-amd/publicApi/segment/changeFontSize.js.map +1 -1
  409. package/lib-amd/publicApi/segment/setBackgroundColor.d.ts +7 -7
  410. package/lib-amd/publicApi/segment/setBackgroundColor.js +34 -34
  411. package/lib-amd/publicApi/segment/setBackgroundColor.js.map +1 -1
  412. package/lib-amd/publicApi/segment/setFontName.d.ts +7 -7
  413. package/lib-amd/publicApi/segment/setFontName.js +19 -19
  414. package/lib-amd/publicApi/segment/setFontName.js.map +1 -1
  415. package/lib-amd/publicApi/segment/setFontSize.d.ts +12 -12
  416. package/lib-amd/publicApi/segment/setFontSize.js +34 -34
  417. package/lib-amd/publicApi/segment/setFontSize.js.map +1 -1
  418. package/lib-amd/publicApi/segment/setTextColor.d.ts +7 -7
  419. package/lib-amd/publicApi/segment/setTextColor.js +26 -26
  420. package/lib-amd/publicApi/segment/setTextColor.js.map +1 -1
  421. package/lib-amd/publicApi/segment/toggleBold.d.ts +6 -6
  422. package/lib-amd/publicApi/segment/toggleBold.js +20 -20
  423. package/lib-amd/publicApi/segment/toggleBold.js.map +1 -1
  424. package/lib-amd/publicApi/segment/toggleCode.d.ts +6 -6
  425. package/lib-amd/publicApi/segment/toggleCode.js +27 -27
  426. package/lib-amd/publicApi/segment/toggleCode.js.map +1 -1
  427. package/lib-amd/publicApi/segment/toggleItalic.d.ts +6 -6
  428. package/lib-amd/publicApi/segment/toggleItalic.js +15 -15
  429. package/lib-amd/publicApi/segment/toggleItalic.js.map +1 -1
  430. package/lib-amd/publicApi/segment/toggleStrikethrough.d.ts +6 -6
  431. package/lib-amd/publicApi/segment/toggleStrikethrough.js +15 -15
  432. package/lib-amd/publicApi/segment/toggleStrikethrough.js.map +1 -1
  433. package/lib-amd/publicApi/segment/toggleSubscript.d.ts +6 -6
  434. package/lib-amd/publicApi/segment/toggleSubscript.js +15 -15
  435. package/lib-amd/publicApi/segment/toggleSubscript.js.map +1 -1
  436. package/lib-amd/publicApi/segment/toggleSuperscript.d.ts +6 -6
  437. package/lib-amd/publicApi/segment/toggleSuperscript.js +15 -15
  438. package/lib-amd/publicApi/segment/toggleSuperscript.js.map +1 -1
  439. package/lib-amd/publicApi/segment/toggleUnderline.d.ts +6 -6
  440. package/lib-amd/publicApi/segment/toggleUnderline.js +18 -18
  441. package/lib-amd/publicApi/segment/toggleUnderline.js.map +1 -1
  442. package/lib-amd/publicApi/table/applyTableBorderFormat.d.ts +8 -8
  443. package/lib-amd/publicApi/table/applyTableBorderFormat.js +292 -292
  444. package/lib-amd/publicApi/table/applyTableBorderFormat.js.map +1 -1
  445. package/lib-amd/publicApi/table/editTable.d.ts +7 -7
  446. package/lib-amd/publicApi/table/editTable.js +66 -88
  447. package/lib-amd/publicApi/table/editTable.js.map +1 -1
  448. package/lib-amd/publicApi/table/formatTable.d.ts +8 -8
  449. package/lib-amd/publicApi/table/formatTable.js +37 -37
  450. package/lib-amd/publicApi/table/formatTable.js.map +1 -1
  451. package/lib-amd/publicApi/table/insertTable.d.ts +11 -11
  452. package/lib-amd/publicApi/table/insertTable.js +45 -45
  453. package/lib-amd/publicApi/table/insertTable.js.map +1 -1
  454. package/lib-amd/publicApi/table/setTableCellShade.d.ts +7 -7
  455. package/lib-amd/publicApi/table/setTableCellShade.js +32 -32
  456. package/lib-amd/publicApi/table/setTableCellShade.js.map +1 -1
  457. package/lib-amd/publicApi/utils/formatImageWithContentModel.d.ts +5 -5
  458. package/lib-amd/publicApi/utils/formatImageWithContentModel.js +15 -15
  459. package/lib-amd/publicApi/utils/formatImageWithContentModel.js.map +1 -1
  460. package/lib-amd/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
  461. package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js +19 -19
  462. package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
  463. package/lib-amd/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
  464. package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js +45 -45
  465. package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
  466. package/lib-amd/publicApi/utils/formatTableWithContentModel.d.ts +9 -0
  467. package/lib-amd/publicApi/utils/formatTableWithContentModel.js +42 -0
  468. package/lib-amd/publicApi/utils/formatTableWithContentModel.js.map +1 -0
  469. package/lib-mjs/index.d.ts +48 -42
  470. package/lib-mjs/index.js +48 -42
  471. package/lib-mjs/index.js.map +1 -1
  472. package/lib-mjs/modelApi/block/setModelAlignment.d.ts +5 -5
  473. package/lib-mjs/modelApi/block/setModelAlignment.js +58 -58
  474. package/lib-mjs/modelApi/block/setModelAlignment.js.map +1 -1
  475. package/lib-mjs/modelApi/block/setModelDirection.d.ts +5 -5
  476. package/lib-mjs/modelApi/block/setModelDirection.js +64 -65
  477. package/lib-mjs/modelApi/block/setModelDirection.js.map +1 -1
  478. package/lib-mjs/modelApi/block/setModelIndentation.d.ts +8 -5
  479. package/lib-mjs/modelApi/block/setModelIndentation.js +134 -43
  480. package/lib-mjs/modelApi/block/setModelIndentation.js.map +1 -1
  481. package/lib-mjs/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
  482. package/lib-mjs/modelApi/block/toggleModelBlockQuote.js +46 -44
  483. package/lib-mjs/modelApi/block/toggleModelBlockQuote.js.map +1 -1
  484. package/lib-mjs/modelApi/common/clearModelFormat.d.ts +5 -5
  485. package/lib-mjs/modelApi/common/clearModelFormat.js +125 -125
  486. package/lib-mjs/modelApi/common/clearModelFormat.js.map +1 -1
  487. package/lib-mjs/modelApi/common/wrapBlock.d.ts +16 -16
  488. package/lib-mjs/modelApi/common/wrapBlock.js +43 -39
  489. package/lib-mjs/modelApi/common/wrapBlock.js.map +1 -1
  490. package/lib-mjs/modelApi/entity/insertEntityModel.d.ts +5 -5
  491. package/lib-mjs/modelApi/entity/insertEntityModel.js +75 -71
  492. package/lib-mjs/modelApi/entity/insertEntityModel.js.map +1 -1
  493. package/lib-mjs/modelApi/image/applyImageBorderFormat.d.ts +5 -5
  494. package/lib-mjs/modelApi/image/applyImageBorderFormat.js +54 -54
  495. package/lib-mjs/modelApi/image/applyImageBorderFormat.js.map +1 -1
  496. package/lib-mjs/modelApi/link/matchLink.d.ts +29 -0
  497. package/lib-mjs/modelApi/link/matchLink.js +91 -0
  498. package/lib-mjs/modelApi/link/matchLink.js.map +1 -0
  499. package/lib-mjs/modelApi/list/findListItemsInSameThread.d.ts +7 -5
  500. package/lib-mjs/modelApi/list/findListItemsInSameThread.js +110 -108
  501. package/lib-mjs/modelApi/list/findListItemsInSameThread.js.map +1 -1
  502. package/lib-mjs/modelApi/list/setListType.d.ts +7 -5
  503. package/lib-mjs/modelApi/list/setListType.js +109 -112
  504. package/lib-mjs/modelApi/list/setListType.js.map +1 -1
  505. package/lib-mjs/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
  506. package/lib-mjs/modelApi/selection/adjustSegmentSelection.js +43 -43
  507. package/lib-mjs/modelApi/selection/adjustSegmentSelection.js.map +1 -1
  508. package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
  509. package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js +51 -51
  510. package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
  511. package/lib-mjs/modelApi/selection/adjustWordSelection.d.ts +5 -5
  512. package/lib-mjs/modelApi/selection/adjustWordSelection.js +117 -117
  513. package/lib-mjs/modelApi/selection/adjustWordSelection.js.map +1 -1
  514. package/lib-mjs/modelApi/selection/collapseTableSelection.d.ts +5 -5
  515. package/lib-mjs/modelApi/selection/collapseTableSelection.js +12 -12
  516. package/lib-mjs/modelApi/selection/collapseTableSelection.js.map +1 -1
  517. package/lib-mjs/modelApi/table/alignTable.d.ts +5 -5
  518. package/lib-mjs/modelApi/table/alignTable.js +8 -8
  519. package/lib-mjs/modelApi/table/alignTable.js.map +1 -1
  520. package/lib-mjs/modelApi/table/alignTableCell.d.ts +9 -9
  521. package/lib-mjs/modelApi/table/alignTableCell.js +53 -53
  522. package/lib-mjs/modelApi/table/alignTableCell.js.map +1 -1
  523. package/lib-mjs/modelApi/table/canMergeCells.d.ts +5 -5
  524. package/lib-mjs/modelApi/table/canMergeCells.js +52 -52
  525. package/lib-mjs/modelApi/table/canMergeCells.js.map +1 -1
  526. package/lib-mjs/modelApi/table/clearSelectedCells.d.ts +8 -0
  527. package/lib-mjs/modelApi/table/clearSelectedCells.js +23 -0
  528. package/lib-mjs/modelApi/table/clearSelectedCells.js.map +1 -0
  529. package/lib-mjs/modelApi/table/createTableStructure.d.ts +5 -5
  530. package/lib-mjs/modelApi/table/createTableStructure.js +15 -15
  531. package/lib-mjs/modelApi/table/createTableStructure.js.map +1 -1
  532. package/lib-mjs/modelApi/table/deleteTable.d.ts +5 -5
  533. package/lib-mjs/modelApi/table/deleteTable.js +7 -7
  534. package/lib-mjs/modelApi/table/deleteTable.js.map +1 -1
  535. package/lib-mjs/modelApi/table/deleteTableColumn.d.ts +5 -5
  536. package/lib-mjs/modelApi/table/deleteTableColumn.js +20 -20
  537. package/lib-mjs/modelApi/table/deleteTableColumn.js.map +1 -1
  538. package/lib-mjs/modelApi/table/deleteTableRow.d.ts +5 -5
  539. package/lib-mjs/modelApi/table/deleteTableRow.js +19 -19
  540. package/lib-mjs/modelApi/table/deleteTableRow.js.map +1 -1
  541. package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
  542. package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js +52 -52
  543. package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
  544. package/lib-mjs/modelApi/table/insertTableColumn.d.ts +7 -5
  545. package/lib-mjs/modelApi/table/insertTableColumn.js +24 -18
  546. package/lib-mjs/modelApi/table/insertTableColumn.js.map +1 -1
  547. package/lib-mjs/modelApi/table/insertTableRow.d.ts +7 -5
  548. package/lib-mjs/modelApi/table/insertTableRow.js +28 -22
  549. package/lib-mjs/modelApi/table/insertTableRow.js.map +1 -1
  550. package/lib-mjs/modelApi/table/mergeTableCells.d.ts +5 -5
  551. package/lib-mjs/modelApi/table/mergeTableCells.js +22 -22
  552. package/lib-mjs/modelApi/table/mergeTableCells.js.map +1 -1
  553. package/lib-mjs/modelApi/table/mergeTableColumn.d.ts +5 -5
  554. package/lib-mjs/modelApi/table/mergeTableColumn.js +33 -33
  555. package/lib-mjs/modelApi/table/mergeTableColumn.js.map +1 -1
  556. package/lib-mjs/modelApi/table/mergeTableRow.d.ts +5 -5
  557. package/lib-mjs/modelApi/table/mergeTableRow.js +34 -34
  558. package/lib-mjs/modelApi/table/mergeTableRow.js.map +1 -1
  559. package/lib-mjs/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
  560. package/lib-mjs/modelApi/table/splitTableCellHorizontally.js +50 -50
  561. package/lib-mjs/modelApi/table/splitTableCellHorizontally.js.map +1 -1
  562. package/lib-mjs/modelApi/table/splitTableCellVertically.d.ts +5 -5
  563. package/lib-mjs/modelApi/table/splitTableCellVertically.js +53 -53
  564. package/lib-mjs/modelApi/table/splitTableCellVertically.js.map +1 -1
  565. package/lib-mjs/publicApi/block/setAlignment.d.ts +7 -7
  566. package/lib-mjs/publicApi/block/setAlignment.js +12 -12
  567. package/lib-mjs/publicApi/block/setAlignment.js.map +1 -1
  568. package/lib-mjs/publicApi/block/setDirection.d.ts +7 -7
  569. package/lib-mjs/publicApi/block/setDirection.js +12 -12
  570. package/lib-mjs/publicApi/block/setDirection.js.map +1 -1
  571. package/lib-mjs/publicApi/block/setHeadingLevel.d.ts +7 -7
  572. package/lib-mjs/publicApi/block/setHeadingLevel.js +46 -46
  573. package/lib-mjs/publicApi/block/setHeadingLevel.js.map +1 -1
  574. package/lib-mjs/publicApi/block/setIndentation.d.ts +8 -8
  575. package/lib-mjs/publicApi/block/setIndentation.js +21 -21
  576. package/lib-mjs/publicApi/block/setIndentation.js.map +1 -1
  577. package/lib-mjs/publicApi/block/setParagraphMargin.d.ts +9 -9
  578. package/lib-mjs/publicApi/block/setParagraphMargin.js +29 -29
  579. package/lib-mjs/publicApi/block/setParagraphMargin.js.map +1 -1
  580. package/lib-mjs/publicApi/block/setSpacing.d.ts +7 -7
  581. package/lib-mjs/publicApi/block/setSpacing.js +17 -17
  582. package/lib-mjs/publicApi/block/setSpacing.js.map +1 -1
  583. package/lib-mjs/publicApi/block/toggleBlockQuote.d.ts +9 -9
  584. package/lib-mjs/publicApi/block/toggleBlockQuote.js +35 -31
  585. package/lib-mjs/publicApi/block/toggleBlockQuote.js.map +1 -1
  586. package/lib-mjs/publicApi/entity/insertEntity.d.ts +25 -25
  587. package/lib-mjs/publicApi/entity/insertEntity.js +38 -37
  588. package/lib-mjs/publicApi/entity/insertEntity.js.map +1 -1
  589. package/lib-mjs/publicApi/format/clearFormat.d.ts +6 -6
  590. package/lib-mjs/publicApi/format/clearFormat.js +19 -19
  591. package/lib-mjs/publicApi/format/clearFormat.js.map +1 -1
  592. package/lib-mjs/publicApi/format/getFormatState.d.ts +6 -26
  593. package/lib-mjs/publicApi/format/getFormatState.js +17 -83
  594. package/lib-mjs/publicApi/format/getFormatState.js.map +1 -1
  595. package/lib-mjs/publicApi/image/adjustImageSelection.d.ts +6 -6
  596. package/lib-mjs/publicApi/image/adjustImageSelection.js +22 -22
  597. package/lib-mjs/publicApi/image/adjustImageSelection.js.map +1 -1
  598. package/lib-mjs/publicApi/image/changeImage.d.ts +7 -7
  599. package/lib-mjs/publicApi/image/changeImage.js +31 -31
  600. package/lib-mjs/publicApi/image/changeImage.js.map +1 -1
  601. package/lib-mjs/publicApi/image/insertImage.d.ts +7 -7
  602. package/lib-mjs/publicApi/image/insertImage.js +33 -33
  603. package/lib-mjs/publicApi/image/insertImage.js.map +1 -1
  604. package/lib-mjs/publicApi/image/setImageAltText.d.ts +8 -8
  605. package/lib-mjs/publicApi/image/setImageAltText.js +13 -13
  606. package/lib-mjs/publicApi/image/setImageAltText.js.map +1 -1
  607. package/lib-mjs/publicApi/image/setImageBorder.d.ts +9 -9
  608. package/lib-mjs/publicApi/image/setImageBorder.js +15 -15
  609. package/lib-mjs/publicApi/image/setImageBorder.js.map +1 -1
  610. package/lib-mjs/publicApi/image/setImageBoxShadow.d.ts +8 -8
  611. package/lib-mjs/publicApi/image/setImageBoxShadow.js +25 -25
  612. package/lib-mjs/publicApi/image/setImageBoxShadow.js.map +1 -1
  613. package/lib-mjs/publicApi/link/adjustLinkSelection.d.ts +6 -6
  614. package/lib-mjs/publicApi/link/adjustLinkSelection.js +30 -30
  615. package/lib-mjs/publicApi/link/adjustLinkSelection.js.map +1 -1
  616. package/lib-mjs/publicApi/link/insertLink.d.ts +15 -15
  617. package/lib-mjs/publicApi/link/insertLink.js +116 -125
  618. package/lib-mjs/publicApi/link/insertLink.js.map +1 -1
  619. package/lib-mjs/publicApi/link/removeLink.d.ts +8 -8
  620. package/lib-mjs/publicApi/link/removeLink.js +28 -28
  621. package/lib-mjs/publicApi/link/removeLink.js.map +1 -1
  622. package/lib-mjs/publicApi/list/setListStartNumber.d.ts +7 -7
  623. package/lib-mjs/publicApi/list/setListStartNumber.js +22 -22
  624. package/lib-mjs/publicApi/list/setListStartNumber.js.map +1 -1
  625. package/lib-mjs/publicApi/list/setListStyle.d.ts +7 -7
  626. package/lib-mjs/publicApi/list/setListStyle.js +29 -29
  627. package/lib-mjs/publicApi/list/setListStyle.js.map +1 -1
  628. package/lib-mjs/publicApi/list/toggleBullet.d.ts +8 -8
  629. package/lib-mjs/publicApi/list/toggleBullet.js +16 -16
  630. package/lib-mjs/publicApi/list/toggleBullet.js.map +1 -1
  631. package/lib-mjs/publicApi/list/toggleNumbering.d.ts +8 -8
  632. package/lib-mjs/publicApi/list/toggleNumbering.js +16 -16
  633. package/lib-mjs/publicApi/list/toggleNumbering.js.map +1 -1
  634. package/lib-mjs/publicApi/segment/applySegmentFormat.d.ts +7 -7
  635. package/lib-mjs/publicApi/segment/applySegmentFormat.js +19 -19
  636. package/lib-mjs/publicApi/segment/applySegmentFormat.js.map +1 -1
  637. package/lib-mjs/publicApi/segment/changeCapitalization.d.ts +10 -10
  638. package/lib-mjs/publicApi/segment/changeCapitalization.js +45 -46
  639. package/lib-mjs/publicApi/segment/changeCapitalization.js.map +1 -1
  640. package/lib-mjs/publicApi/segment/changeFontSize.d.ts +8 -8
  641. package/lib-mjs/publicApi/segment/changeFontSize.js +58 -58
  642. package/lib-mjs/publicApi/segment/changeFontSize.js.map +1 -1
  643. package/lib-mjs/publicApi/segment/setBackgroundColor.d.ts +7 -7
  644. package/lib-mjs/publicApi/segment/setBackgroundColor.js +32 -32
  645. package/lib-mjs/publicApi/segment/setBackgroundColor.js.map +1 -1
  646. package/lib-mjs/publicApi/segment/setFontName.d.ts +7 -7
  647. package/lib-mjs/publicApi/segment/setFontName.js +15 -15
  648. package/lib-mjs/publicApi/segment/setFontName.js.map +1 -1
  649. package/lib-mjs/publicApi/segment/setFontSize.d.ts +12 -12
  650. package/lib-mjs/publicApi/segment/setFontSize.js +28 -28
  651. package/lib-mjs/publicApi/segment/setFontSize.js.map +1 -1
  652. package/lib-mjs/publicApi/segment/setTextColor.d.ts +7 -7
  653. package/lib-mjs/publicApi/segment/setTextColor.js +22 -22
  654. package/lib-mjs/publicApi/segment/setTextColor.js.map +1 -1
  655. package/lib-mjs/publicApi/segment/toggleBold.d.ts +6 -6
  656. package/lib-mjs/publicApi/segment/toggleBold.js +17 -17
  657. package/lib-mjs/publicApi/segment/toggleBold.js.map +1 -1
  658. package/lib-mjs/publicApi/segment/toggleCode.d.ts +6 -6
  659. package/lib-mjs/publicApi/segment/toggleCode.js +24 -24
  660. package/lib-mjs/publicApi/segment/toggleCode.js.map +1 -1
  661. package/lib-mjs/publicApi/segment/toggleItalic.d.ts +6 -6
  662. package/lib-mjs/publicApi/segment/toggleItalic.js +11 -11
  663. package/lib-mjs/publicApi/segment/toggleItalic.js.map +1 -1
  664. package/lib-mjs/publicApi/segment/toggleStrikethrough.d.ts +6 -6
  665. package/lib-mjs/publicApi/segment/toggleStrikethrough.js +11 -11
  666. package/lib-mjs/publicApi/segment/toggleStrikethrough.js.map +1 -1
  667. package/lib-mjs/publicApi/segment/toggleSubscript.d.ts +6 -6
  668. package/lib-mjs/publicApi/segment/toggleSubscript.js +11 -11
  669. package/lib-mjs/publicApi/segment/toggleSubscript.js.map +1 -1
  670. package/lib-mjs/publicApi/segment/toggleSuperscript.d.ts +6 -6
  671. package/lib-mjs/publicApi/segment/toggleSuperscript.js +11 -11
  672. package/lib-mjs/publicApi/segment/toggleSuperscript.js.map +1 -1
  673. package/lib-mjs/publicApi/segment/toggleUnderline.d.ts +6 -6
  674. package/lib-mjs/publicApi/segment/toggleUnderline.js +15 -15
  675. package/lib-mjs/publicApi/segment/toggleUnderline.js.map +1 -1
  676. package/lib-mjs/publicApi/table/applyTableBorderFormat.d.ts +8 -8
  677. package/lib-mjs/publicApi/table/applyTableBorderFormat.js +290 -290
  678. package/lib-mjs/publicApi/table/applyTableBorderFormat.js.map +1 -1
  679. package/lib-mjs/publicApi/table/editTable.d.ts +7 -7
  680. package/lib-mjs/publicApi/table/editTable.js +74 -99
  681. package/lib-mjs/publicApi/table/editTable.js.map +1 -1
  682. package/lib-mjs/publicApi/table/formatTable.d.ts +8 -8
  683. package/lib-mjs/publicApi/table/formatTable.js +34 -34
  684. package/lib-mjs/publicApi/table/formatTable.js.map +1 -1
  685. package/lib-mjs/publicApi/table/insertTable.d.ts +11 -11
  686. package/lib-mjs/publicApi/table/insertTable.js +43 -43
  687. package/lib-mjs/publicApi/table/insertTable.js.map +1 -1
  688. package/lib-mjs/publicApi/table/setTableCellShade.d.ts +7 -7
  689. package/lib-mjs/publicApi/table/setTableCellShade.js +29 -29
  690. package/lib-mjs/publicApi/table/setTableCellShade.js.map +1 -1
  691. package/lib-mjs/publicApi/utils/formatImageWithContentModel.d.ts +5 -5
  692. package/lib-mjs/publicApi/utils/formatImageWithContentModel.js +11 -11
  693. package/lib-mjs/publicApi/utils/formatImageWithContentModel.js.map +1 -1
  694. package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.d.ts +5 -5
  695. package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js +14 -14
  696. package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
  697. package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.d.ts +5 -5
  698. package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js +42 -42
  699. package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
  700. package/lib-mjs/publicApi/utils/formatTableWithContentModel.d.ts +9 -0
  701. package/lib-mjs/publicApi/utils/formatTableWithContentModel.js +40 -0
  702. package/lib-mjs/publicApi/utils/formatTableWithContentModel.js.map +1 -0
  703. package/package.json +4 -6
  704. package/lib/modelApi/common/retrieveModelFormatState.d.ts +0 -5
  705. package/lib/modelApi/common/retrieveModelFormatState.js +0 -173
  706. package/lib/modelApi/common/retrieveModelFormatState.js.map +0 -1
  707. package/lib-amd/modelApi/common/retrieveModelFormatState.d.ts +0 -5
  708. package/lib-amd/modelApi/common/retrieveModelFormatState.js +0 -173
  709. package/lib-amd/modelApi/common/retrieveModelFormatState.js.map +0 -1
  710. package/lib-mjs/modelApi/common/retrieveModelFormatState.d.ts +0 -5
  711. package/lib-mjs/modelApi/common/retrieveModelFormatState.js +0 -169
  712. package/lib-mjs/modelApi/common/retrieveModelFormatState.js.map +0 -1
@@ -1,40 +1,41 @@
1
- define(["require", "exports", "roosterjs-content-model-core", "roosterjs-content-model-dom", "../../modelApi/entity/insertEntityModel"], function (require, exports, roosterjs_content_model_core_1, roosterjs_content_model_dom_1, insertEntityModel_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- var BlockEntityTag = 'div';
5
- var InlineEntityTag = 'span';
6
- function insertEntity(editor, type, isBlock, position, options) {
7
- var _a = options || {}, contentNode = _a.contentNode, focusAfterEntity = _a.focusAfterEntity, wrapperDisplay = _a.wrapperDisplay, skipUndoSnapshot = _a.skipUndoSnapshot;
8
- var wrapper = editor.getDocument().createElement(isBlock ? BlockEntityTag : InlineEntityTag);
9
- var display = wrapperDisplay !== null && wrapperDisplay !== void 0 ? wrapperDisplay : (isBlock ? undefined : 'inline-block');
10
- wrapper.style.setProperty('display', display || null);
11
- if (contentNode) {
12
- wrapper.appendChild(contentNode);
13
- }
14
- var entityModel = (0, roosterjs_content_model_dom_1.createEntity)(wrapper, true /*isReadonly*/, undefined /*format*/, type);
15
- editor.formatContentModel(function (model, context) {
16
- (0, insertEntityModel_1.insertEntityModel)(model, entityModel, typeof position == 'string' ? position : 'focus', isBlock, focusAfterEntity, context);
17
- (0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
18
- context.skipUndoSnapshot = skipUndoSnapshot;
19
- context.newEntities.push(entityModel);
20
- return true;
21
- }, {
22
- selectionOverride: typeof position === 'object' ? position : undefined,
23
- changeSource: roosterjs_content_model_core_1.ChangeSource.InsertEntity,
24
- getChangeData: function () {
25
- // TODO: Remove this entity when we have standalone editor
26
- var entity = {
27
- wrapper: wrapper,
28
- type: type,
29
- id: '',
30
- isReadonly: true,
31
- };
32
- return entity;
33
- },
34
- apiName: 'insertEntity',
35
- });
36
- return entityModel;
37
- }
38
- exports.default = insertEntity;
39
- });
1
+ define(["require", "exports", "roosterjs-content-model-core", "roosterjs-content-model-dom", "../../modelApi/entity/insertEntityModel"], function (require, exports, roosterjs_content_model_core_1, roosterjs_content_model_dom_1, insertEntityModel_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ var BlockEntityTag = 'div';
5
+ var InlineEntityTag = 'span';
6
+ function insertEntity(editor, type, isBlock, position, options) {
7
+ var _a = options || {}, contentNode = _a.contentNode, focusAfterEntity = _a.focusAfterEntity, wrapperDisplay = _a.wrapperDisplay, skipUndoSnapshot = _a.skipUndoSnapshot;
8
+ var document = editor.getDocument();
9
+ var wrapper = document.createElement(isBlock ? BlockEntityTag : InlineEntityTag);
10
+ var display = wrapperDisplay !== null && wrapperDisplay !== void 0 ? wrapperDisplay : (isBlock ? undefined : 'inline-block');
11
+ wrapper.style.setProperty('display', display || null);
12
+ if (display == undefined && isBlock) {
13
+ wrapper.style.setProperty('width', '100%');
14
+ wrapper.style.setProperty('display', 'inline-block');
15
+ }
16
+ if (contentNode) {
17
+ wrapper.appendChild(contentNode);
18
+ }
19
+ var entityModel = (0, roosterjs_content_model_dom_1.createEntity)(wrapper, true /* isReadonly */, undefined /*format*/, type);
20
+ editor.formatContentModel(function (model, context) {
21
+ (0, insertEntityModel_1.insertEntityModel)(model, entityModel, typeof position == 'string' ? position : 'focus', isBlock, focusAfterEntity, context);
22
+ (0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
23
+ context.skipUndoSnapshot = skipUndoSnapshot;
24
+ context.newEntities.push(entityModel);
25
+ return true;
26
+ }, {
27
+ selectionOverride: typeof position === 'object' ? position : undefined,
28
+ changeSource: roosterjs_content_model_core_1.ChangeSource.InsertEntity,
29
+ getChangeData: function () { return ({
30
+ wrapper: wrapper,
31
+ type: type,
32
+ id: '',
33
+ isReadonly: true,
34
+ }); },
35
+ apiName: 'insertEntity',
36
+ });
37
+ return entityModel;
38
+ }
39
+ exports.default = insertEntity;
40
+ });
40
41
  //# sourceMappingURL=insertEntity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"insertEntity.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/entity/insertEntity.ts"],"names":[],"mappings":";;;IAYA,IAAM,cAAc,GAAG,KAAK,CAAC;IAC7B,IAAM,eAAe,GAAG,MAAM,CAAC;IAwC/B,SAAwB,YAAY,CAChC,MAAyB,EACzB,IAAY,EACZ,OAAgB,EAChB,QAA8C,EAC9C,OAA6B;QAEvB,IAAA,KAAsE,OAAO,IAAI,EAAE,EAAjF,WAAW,iBAAA,EAAE,gBAAgB,sBAAA,EAAE,cAAc,oBAAA,EAAE,gBAAgB,sBAAkB,CAAC;QAC1F,IAAM,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QAC/F,IAAM,OAAO,GAAG,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAEzE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;QAEtD,IAAI,WAAW,EAAE;YACb,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;SACpC;QAED,IAAM,WAAW,GAAG,IAAA,0CAAY,EAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE3F,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,IAAA,qCAAiB,EACb,KAAK,EACL,WAAW,EACX,OAAO,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAChD,OAAO,EACP,gBAAgB,EAChB,OAAO,CACV,CAAC;YAEF,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YAC5C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAEtC,OAAO,IAAI,CAAC;QAChB,CAAC,EACD;YACI,iBAAiB,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACtE,YAAY,EAAE,2CAAY,CAAC,YAAY;YACvC,aAAa,EAAE;gBACX,0DAA0D;gBAC1D,IAAM,MAAM,GAAW;oBACnB,OAAO,SAAA;oBACP,IAAI,MAAA;oBACJ,EAAE,EAAE,EAAE;oBACN,UAAU,EAAE,IAAI;iBACnB,CAAC;gBAEF,OAAO,MAAM,CAAC;YAClB,CAAC;YACD,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;QAEF,OAAO,WAAW,CAAC;IACvB,CAAC;IAxDD,+BAwDC","sourcesContent":["import { ChangeSource } from 'roosterjs-content-model-core';\nimport { createEntity, normalizeContentModel } from 'roosterjs-content-model-dom';\nimport { insertEntityModel } from '../../modelApi/entity/insertEntityModel';\nimport type {\n ContentModelEntity,\n DOMSelection,\n InsertEntityPosition,\n InsertEntityOptions,\n IStandaloneEditor,\n} from 'roosterjs-content-model-types';\nimport type { Entity } from 'roosterjs-editor-types';\n\nconst BlockEntityTag = 'div';\nconst InlineEntityTag = 'span';\n\n/**\n * Insert an entity into editor\n * @param editor The Content Model editor\n * @param type Type of entity\n * @param isBlock True to insert a block entity, false to insert an inline entity\n * @param position Position of the entity to insert. It can be\n * Value of InsertEntityPosition: see InsertEntityPosition\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\n * @param options Move options to insert. See InsertEntityOptions\n */\nexport default function insertEntity(\n editor: IStandaloneEditor,\n type: string,\n isBlock: boolean,\n position: 'focus' | 'begin' | 'end' | DOMSelection,\n options?: InsertEntityOptions\n): ContentModelEntity | null;\n\n/**\n * Insert a block entity into editor\n * @param editor The Content Model editor\n * @param type Type of entity\n * @param isBlock Must be true for a block entity\n * @param position Position of the entity to insert. It can be\n * Value of InsertEntityPosition: see InsertEntityPosition\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\n * @param options Move options to insert. See InsertEntityOptions\n */\nexport default function insertEntity(\n editor: IStandaloneEditor,\n type: string,\n isBlock: true,\n position: InsertEntityPosition | DOMSelection,\n options?: InsertEntityOptions\n): ContentModelEntity | null;\n\nexport default function insertEntity(\n editor: IStandaloneEditor,\n type: string,\n isBlock: boolean,\n position?: InsertEntityPosition | DOMSelection,\n options?: InsertEntityOptions\n): ContentModelEntity | null {\n const { contentNode, focusAfterEntity, wrapperDisplay, skipUndoSnapshot } = options || {};\n const wrapper = editor.getDocument().createElement(isBlock ? BlockEntityTag : InlineEntityTag);\n const display = wrapperDisplay ?? (isBlock ? undefined : 'inline-block');\n\n wrapper.style.setProperty('display', display || null);\n\n if (contentNode) {\n wrapper.appendChild(contentNode);\n }\n\n const entityModel = createEntity(wrapper, true /*isReadonly*/, undefined /*format*/, type);\n\n editor.formatContentModel(\n (model, context) => {\n insertEntityModel(\n model,\n entityModel,\n typeof position == 'string' ? position : 'focus',\n isBlock,\n focusAfterEntity,\n context\n );\n\n normalizeContentModel(model);\n\n context.skipUndoSnapshot = skipUndoSnapshot;\n context.newEntities.push(entityModel);\n\n return true;\n },\n {\n selectionOverride: typeof position === 'object' ? position : undefined,\n changeSource: ChangeSource.InsertEntity,\n getChangeData: () => {\n // TODO: Remove this entity when we have standalone editor\n const entity: Entity = {\n wrapper,\n type,\n id: '',\n isReadonly: true,\n };\n\n return entity;\n },\n apiName: 'insertEntity',\n }\n );\n\n return entityModel;\n}\n"]}
1
+ {"version":3,"file":"insertEntity.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/entity/insertEntity.ts"],"names":[],"mappings":";;;IAWA,IAAM,cAAc,GAAG,KAAK,CAAC;IAC7B,IAAM,eAAe,GAAG,MAAM,CAAC;IAwC/B,SAAwB,YAAY,CAChC,MAAyB,EACzB,IAAY,EACZ,OAAgB,EAChB,QAA8C,EAC9C,OAA6B;QAEvB,IAAA,KAAsE,OAAO,IAAI,EAAE,EAAjF,WAAW,iBAAA,EAAE,gBAAgB,sBAAA,EAAE,cAAc,oBAAA,EAAE,gBAAgB,sBAAkB,CAAC;QAC1F,IAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QACtC,IAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACnF,IAAM,OAAO,GAAG,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAEzE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;QAEtD,IAAI,OAAO,IAAI,SAAS,IAAI,OAAO,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SACxD;QAED,IAAI,WAAW,EAAE;YACb,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;SACpC;QAED,IAAM,WAAW,GAAG,IAAA,0CAAY,EAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE7F,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;YACX,IAAA,qCAAiB,EACb,KAAK,EACL,WAAW,EACX,OAAO,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAChD,OAAO,EACP,gBAAgB,EAChB,OAAO,CACV,CAAC;YAEF,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YAC5C,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAEtC,OAAO,IAAI,CAAC;QAChB,CAAC,EACD;YACI,iBAAiB,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACtE,YAAY,EAAE,2CAAY,CAAC,YAAY;YACvC,aAAa,EAAE,cAAM,OAAA,CAAC;gBAClB,OAAO,SAAA;gBACP,IAAI,MAAA;gBACJ,EAAE,EAAE,EAAE;gBACN,UAAU,EAAE,IAAI;aACnB,CAAC,EALmB,CAKnB;YACF,OAAO,EAAE,cAAc;SAC1B,CACJ,CAAC;QAEF,OAAO,WAAW,CAAC;IACvB,CAAC;IAzDD,+BAyDC","sourcesContent":["import { ChangeSource } from 'roosterjs-content-model-core';\r\nimport { createEntity, normalizeContentModel } from 'roosterjs-content-model-dom';\r\nimport { insertEntityModel } from '../../modelApi/entity/insertEntityModel';\r\nimport type {\r\n ContentModelEntity,\r\n DOMSelection,\r\n InsertEntityPosition,\r\n InsertEntityOptions,\r\n IStandaloneEditor,\r\n} from 'roosterjs-content-model-types';\r\n\r\nconst BlockEntityTag = 'div';\r\nconst InlineEntityTag = 'span';\r\n\r\n/**\r\n * Insert an entity into editor\r\n * @param editor The Content Model editor\r\n * @param type Type of entity\r\n * @param isBlock True to insert a block entity, false to insert an inline entity\r\n * @param position Position of the entity to insert. It can be\r\n * Value of InsertEntityPosition: see InsertEntityPosition\r\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\r\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\r\n * @param options Move options to insert. See InsertEntityOptions\r\n */\r\nexport default function insertEntity(\r\n editor: IStandaloneEditor,\r\n type: string,\r\n isBlock: boolean,\r\n position: 'focus' | 'begin' | 'end' | DOMSelection,\r\n options?: InsertEntityOptions\r\n): ContentModelEntity | null;\r\n\r\n/**\r\n * Insert a block entity into editor\r\n * @param editor The Content Model editor\r\n * @param type Type of entity\r\n * @param isBlock Must be true for a block entity\r\n * @param position Position of the entity to insert. It can be\r\n * Value of InsertEntityPosition: see InsertEntityPosition\r\n * selectionRangeEx: Use this range instead of current focus position to insert. After insert, focus will be moved to\r\n * the beginning of this range (when focusAfterEntity is not set to true) or after the new entity (when focusAfterEntity is set to true)\r\n * @param options Move options to insert. See InsertEntityOptions\r\n */\r\nexport default function insertEntity(\r\n editor: IStandaloneEditor,\r\n type: string,\r\n isBlock: true,\r\n position: InsertEntityPosition | DOMSelection,\r\n options?: InsertEntityOptions\r\n): ContentModelEntity | null;\r\n\r\nexport default function insertEntity(\r\n editor: IStandaloneEditor,\r\n type: string,\r\n isBlock: boolean,\r\n position?: InsertEntityPosition | DOMSelection,\r\n options?: InsertEntityOptions\r\n): ContentModelEntity | null {\r\n const { contentNode, focusAfterEntity, wrapperDisplay, skipUndoSnapshot } = options || {};\r\n const document = editor.getDocument();\r\n const wrapper = document.createElement(isBlock ? BlockEntityTag : InlineEntityTag);\r\n const display = wrapperDisplay ?? (isBlock ? undefined : 'inline-block');\r\n\r\n wrapper.style.setProperty('display', display || null);\r\n\r\n if (display == undefined && isBlock) {\r\n wrapper.style.setProperty('width', '100%');\r\n wrapper.style.setProperty('display', 'inline-block');\r\n }\r\n\r\n if (contentNode) {\r\n wrapper.appendChild(contentNode);\r\n }\r\n\r\n const entityModel = createEntity(wrapper, true /* isReadonly */, undefined /*format*/, type);\r\n\r\n editor.formatContentModel(\r\n (model, context) => {\r\n insertEntityModel(\r\n model,\r\n entityModel,\r\n typeof position == 'string' ? position : 'focus',\r\n isBlock,\r\n focusAfterEntity,\r\n context\r\n );\r\n\r\n normalizeContentModel(model);\r\n\r\n context.skipUndoSnapshot = skipUndoSnapshot;\r\n context.newEntities.push(entityModel);\r\n\r\n return true;\r\n },\r\n {\r\n selectionOverride: typeof position === 'object' ? position : undefined,\r\n changeSource: ChangeSource.InsertEntity,\r\n getChangeData: () => ({\r\n wrapper,\r\n type,\r\n id: '',\r\n isReadonly: true,\r\n }),\r\n apiName: 'insertEntity',\r\n }\r\n );\r\n\r\n return entityModel;\r\n}\r\n"]}
@@ -1,6 +1,6 @@
1
- import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * Clear format of selection
4
- * @param editor The editor to clear format from
5
- */
6
- export default function clearFormat(editor: IStandaloneEditor): void;
1
+ import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * Clear format of selection
4
+ * @param editor The editor to clear format from
5
+ */
6
+ export default function clearFormat(editor: IStandaloneEditor): void;
@@ -1,23 +1,23 @@
1
- define(["require", "exports", "../../modelApi/common/clearModelFormat", "roosterjs-content-model-dom"], function (require, exports, clearModelFormat_1, roosterjs_content_model_dom_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- /**
5
- * Clear format of selection
6
- * @param editor The editor to clear format from
7
- */
8
- function clearFormat(editor) {
9
- editor.focus();
10
- editor.formatContentModel(function (model) {
11
- var blocksToClear = [];
12
- var segmentsToClear = [];
13
- var tablesToClear = [];
14
- (0, clearModelFormat_1.clearModelFormat)(model, blocksToClear, segmentsToClear, tablesToClear);
15
- (0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
16
- return (blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0);
17
- }, {
18
- apiName: 'clearFormat',
19
- });
20
- }
21
- exports.default = clearFormat;
22
- });
1
+ define(["require", "exports", "../../modelApi/common/clearModelFormat", "roosterjs-content-model-dom"], function (require, exports, clearModelFormat_1, roosterjs_content_model_dom_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /**
5
+ * Clear format of selection
6
+ * @param editor The editor to clear format from
7
+ */
8
+ function clearFormat(editor) {
9
+ editor.focus();
10
+ editor.formatContentModel(function (model) {
11
+ var blocksToClear = [];
12
+ var segmentsToClear = [];
13
+ var tablesToClear = [];
14
+ (0, clearModelFormat_1.clearModelFormat)(model, blocksToClear, segmentsToClear, tablesToClear);
15
+ (0, roosterjs_content_model_dom_1.normalizeContentModel)(model);
16
+ return (blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0);
17
+ }, {
18
+ apiName: 'clearFormat',
19
+ });
20
+ }
21
+ exports.default = clearFormat;
22
+ });
23
23
  //# sourceMappingURL=clearFormat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clearFormat.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/clearFormat.ts"],"names":[],"mappings":";;;IAUA;;;OAGG;IACH,SAAwB,WAAW,CAAC,MAAyB;QACzD,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,aAAa,GAAoD,EAAE,CAAC;YAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;YAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;YAEzD,IAAA,mCAAgB,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEvE,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CACH,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CACrF,CAAC;QACN,CAAC,EACD;YACI,OAAO,EAAE,aAAa;SACzB,CACJ,CAAC;IACN,CAAC;IArBD,8BAqBC","sourcesContent":["import { clearModelFormat } from '../../modelApi/common/clearModelFormat';\nimport { normalizeContentModel } from 'roosterjs-content-model-dom';\nimport type {\n IStandaloneEditor,\n ContentModelBlock,\n ContentModelBlockGroup,\n ContentModelSegment,\n ContentModelTable,\n} from 'roosterjs-content-model-types';\n\n/**\n * Clear format of selection\n * @param editor The editor to clear format from\n */\nexport default function clearFormat(editor: IStandaloneEditor) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n const blocksToClear: [ContentModelBlockGroup[], ContentModelBlock][] = [];\n const segmentsToClear: ContentModelSegment[] = [];\n const tablesToClear: [ContentModelTable, boolean][] = [];\n\n clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);\n\n normalizeContentModel(model);\n\n return (\n blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0\n );\n },\n {\n apiName: 'clearFormat',\n }\n );\n}\n"]}
1
+ {"version":3,"file":"clearFormat.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/clearFormat.ts"],"names":[],"mappings":";;;IAUA;;;OAGG;IACH,SAAwB,WAAW,CAAC,MAAyB;QACzD,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,IAAM,aAAa,GAAoD,EAAE,CAAC;YAC1E,IAAM,eAAe,GAA0B,EAAE,CAAC;YAClD,IAAM,aAAa,GAAmC,EAAE,CAAC;YAEzD,IAAA,mCAAgB,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEvE,IAAA,mDAAqB,EAAC,KAAK,CAAC,CAAC;YAE7B,OAAO,CACH,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CACrF,CAAC;QACN,CAAC,EACD;YACI,OAAO,EAAE,aAAa;SACzB,CACJ,CAAC;IACN,CAAC;IArBD,8BAqBC","sourcesContent":["import { clearModelFormat } from '../../modelApi/common/clearModelFormat';\r\nimport { normalizeContentModel } from 'roosterjs-content-model-dom';\r\nimport type {\r\n IStandaloneEditor,\r\n ContentModelBlock,\r\n ContentModelBlockGroup,\r\n ContentModelSegment,\r\n ContentModelTable,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Clear format of selection\r\n * @param editor The editor to clear format from\r\n */\r\nexport default function clearFormat(editor: IStandaloneEditor) {\r\n editor.focus();\r\n\r\n editor.formatContentModel(\r\n model => {\r\n const blocksToClear: [ContentModelBlockGroup[], ContentModelBlock][] = [];\r\n const segmentsToClear: ContentModelSegment[] = [];\r\n const tablesToClear: [ContentModelTable, boolean][] = [];\r\n\r\n clearModelFormat(model, blocksToClear, segmentsToClear, tablesToClear);\r\n\r\n normalizeContentModel(model);\r\n\r\n return (\r\n blocksToClear.length > 0 || segmentsToClear.length > 0 || tablesToClear.length > 0\r\n );\r\n },\r\n {\r\n apiName: 'clearFormat',\r\n }\r\n );\r\n}\r\n"]}
@@ -1,26 +1,6 @@
1
- import type { IStandaloneEditor, ContentModelBlockGroup, ContentModelFormatState, DomToModelContext } from 'roosterjs-content-model-types';
2
- /**
3
- * Get current format state
4
- * @param editor The editor to get format from
5
- */
6
- export default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState;
7
- /**
8
- * @internal
9
- */
10
- interface FormatStateContext extends DomToModelContext {
11
- /**
12
- * An optional stack of parent elements to process. When provided, the child nodes of current parent element will be ignored,
13
- * but use the top element in this stack instead in childProcessor.
14
- */
15
- nodeStack?: Node[];
16
- }
17
- /**
18
- * @internal
19
- * Export for test only
20
- * In order to get format, we can still use the regular child processor. However, to improve performance, we don't need to create
21
- * content model for the whole doc, instead we only need to traverse the tree path that can arrive current selected node.
22
- * This "reduced" child processor will first create a node stack that stores DOM node from root to current common ancestor node of selection,
23
- * then use this stack as a faked DOM tree to create a reduced content model which we can use to retrieve format state
24
- */
25
- export declare function reducedModelChildProcessor(group: ContentModelBlockGroup, parent: ParentNode, context: FormatStateContext): void;
26
- export {};
1
+ import type { IStandaloneEditor, ContentModelFormatState } from 'roosterjs-content-model-types';
2
+ /**
3
+ * Get current format state
4
+ * @param editor The editor to get format from
5
+ */
6
+ export default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState;
@@ -1,87 +1,22 @@
1
- define(["require", "exports", "tslib", "roosterjs-content-model-core", "../../modelApi/common/retrieveModelFormatState", "roosterjs-content-model-dom"], function (require, exports, tslib_1, roosterjs_content_model_core_1, retrieveModelFormatState_1, roosterjs_content_model_dom_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.reducedModelChildProcessor = void 0;
5
- /**
6
- * Get current format state
7
- * @param editor The editor to get format from
8
- */
9
- function getFormatState(editor) {
10
- var pendingFormat = editor.getPendingFormat();
11
- var model = editor.createContentModel({
12
- processorOverride: {
13
- child: reducedModelChildProcessor,
14
- },
15
- });
16
- var manager = editor.getSnapshotsManager();
17
- var result = {
18
- canUndo: manager.hasNewContent || manager.canMove(-1),
19
- canRedo: manager.canMove(1),
20
- isDarkMode: editor.isDarkMode(),
21
- zoomScale: editor.getZoomScale(),
22
- };
23
- (0, retrieveModelFormatState_1.retrieveModelFormatState)(model, pendingFormat, result);
24
- return result;
25
- }
26
- exports.default = getFormatState;
27
- /**
28
- * @internal
29
- * Export for test only
30
- * In order to get format, we can still use the regular child processor. However, to improve performance, we don't need to create
31
- * content model for the whole doc, instead we only need to traverse the tree path that can arrive current selected node.
32
- * This "reduced" child processor will first create a node stack that stores DOM node from root to current common ancestor node of selection,
33
- * then use this stack as a faked DOM tree to create a reduced content model which we can use to retrieve format state
34
- */
35
- function reducedModelChildProcessor(group, parent, context) {
36
- if (!context.nodeStack) {
37
- var selectionRootNode = (0, roosterjs_content_model_core_1.getSelectionRootNode)(context.selection);
38
- context.nodeStack = selectionRootNode ? createNodeStack(parent, selectionRootNode) : [];
39
- }
40
- var stackChild = context.nodeStack.pop();
41
- if (stackChild) {
42
- var _a = (0, tslib_1.__read)((0, roosterjs_content_model_dom_1.getRegularSelectionOffsets)(context, parent), 2), nodeStartOffset = _a[0], nodeEndOffset = _a[1];
43
- // If selection is not on this node, skip getting node index to save some time since we don't need it here
44
- var index = nodeStartOffset >= 0 || nodeEndOffset >= 0 ? getChildIndex(parent, stackChild) : -1;
45
- if (index >= 0) {
46
- (0, roosterjs_content_model_dom_1.handleRegularSelection)(index, context, group, nodeStartOffset, nodeEndOffset);
47
- }
48
- (0, roosterjs_content_model_dom_1.processChildNode)(group, stackChild, context);
49
- if (index >= 0) {
50
- (0, roosterjs_content_model_dom_1.handleRegularSelection)(index + 1, context, group, nodeStartOffset, nodeEndOffset);
51
- }
52
- }
53
- else {
54
- // No child node from node stack, that means we have reached the deepest node of selection.
55
- // Now we can use default child processor to perform full sub tree scanning for content model,
56
- // So that all selected node will be included.
57
- context.defaultElementProcessors.child(group, parent, context);
58
- }
59
- }
60
- exports.reducedModelChildProcessor = reducedModelChildProcessor;
61
- function createNodeStack(root, startNode) {
62
- var result = [];
63
- var node = startNode;
64
- while (node && root != node && root.contains(node)) {
65
- if ((0, roosterjs_content_model_dom_1.isNodeOfType)(node, 'ELEMENT_NODE') && node.tagName == 'TABLE') {
66
- // For table, we can't do a reduced model creation since we need to handle their cells and indexes,
67
- // so clean up whatever we already have, and just put table into the stack
68
- result.splice(0, result.length, node);
69
- }
70
- else {
71
- result.push(node);
72
- }
73
- node = node.parentNode;
74
- }
75
- return result;
76
- }
77
- function getChildIndex(parent, stackChild) {
78
- var index = 0;
79
- var child = parent.firstChild;
80
- while (child && child != stackChild) {
81
- index++;
82
- child = child.nextSibling;
83
- }
84
- return index;
85
- }
86
- });
1
+ define(["require", "exports", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_core_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /**
5
+ * Get current format state
6
+ * @param editor The editor to get format from
7
+ */
8
+ function getFormatState(editor) {
9
+ var pendingFormat = editor.getPendingFormat();
10
+ var model = editor.getContentModelCopy('reduced');
11
+ var manager = editor.getSnapshotsManager();
12
+ var result = {
13
+ canUndo: manager.hasNewContent || manager.canMove(-1),
14
+ canRedo: manager.canMove(1),
15
+ isDarkMode: editor.isDarkMode(),
16
+ };
17
+ (0, roosterjs_content_model_core_1.retrieveModelFormatState)(model, pendingFormat, result);
18
+ return result;
19
+ }
20
+ exports.default = getFormatState;
21
+ });
87
22
  //# sourceMappingURL=getFormatState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFormatState.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/getFormatState.ts"],"names":[],"mappings":";;;;IAgBA;;;OAGG;IACH,SAAwB,cAAc,CAAC,MAAyB;QAC5D,IAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAChD,IAAM,KAAK,GAAG,MAAM,CAAC,kBAAkB,CAAC;YACpC,iBAAiB,EAAE;gBACf,KAAK,EAAE,0BAA0B;aACpC;SACJ,CAAC,CAAC;QACH,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAC7C,IAAM,MAAM,GAA4B;YACpC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;YAC/B,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE;SACnC,CAAC;QAEF,IAAA,mDAAwB,EAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QAEvD,OAAO,MAAM,CAAC;IAClB,CAAC;IAlBD,iCAkBC;IAaD;;;;;;;OAOG;IACH,SAAgB,0BAA0B,CACtC,KAA6B,EAC7B,MAAkB,EAClB,OAA2B;QAE3B,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YACpB,IAAM,iBAAiB,GAAG,IAAA,mDAAoB,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAClE,OAAO,CAAC,SAAS,GAAG,iBAAiB,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3F;QAED,IAAM,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QAE3C,IAAI,UAAU,EAAE;YACN,IAAA,KAAA,oBAAmC,IAAA,wDAA0B,EAAC,OAAO,EAAE,MAAM,CAAC,IAAA,EAA7E,eAAe,QAAA,EAAE,aAAa,QAA+C,CAAC;YAErF,0GAA0G;YAC1G,IAAM,KAAK,GACP,eAAe,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAExF,IAAI,KAAK,IAAI,CAAC,EAAE;gBACZ,IAAA,oDAAsB,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;aACjF;YAED,IAAA,8CAAgB,EAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;YAE7C,IAAI,KAAK,IAAI,CAAC,EAAE;gBACZ,IAAA,oDAAsB,EAAC,KAAK,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;aACrF;SACJ;aAAM;YACH,2FAA2F;YAC3F,8FAA8F;YAC9F,8CAA8C;YAC9C,OAAO,CAAC,wBAAwB,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;SAClE;IACL,CAAC;IAlCD,gEAkCC;IAED,SAAS,eAAe,CAAC,IAAU,EAAE,SAAe;QAChD,IAAM,MAAM,GAAW,EAAE,CAAC;QAC1B,IAAI,IAAI,GAAgB,SAAS,CAAC;QAElC,OAAO,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAChD,IAAI,IAAA,0CAAY,EAAC,IAAI,EAAE,cAAc,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,EAAE;gBAC/D,mGAAmG;gBACnG,0EAA0E;gBAC1E,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aACzC;iBAAM;gBACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;YAED,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;SAC1B;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,SAAS,aAAa,CAAC,MAAkB,EAAE,UAAgB;QACvD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;QAE9B,OAAO,KAAK,IAAI,KAAK,IAAI,UAAU,EAAE;YACjC,KAAK,EAAE,CAAC;YACR,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC;SAC7B;QACD,OAAO,KAAK,CAAC;IACjB,CAAC","sourcesContent":["import { getSelectionRootNode } from 'roosterjs-content-model-core';\nimport { retrieveModelFormatState } from '../../modelApi/common/retrieveModelFormatState';\nimport type {\n IStandaloneEditor,\n ContentModelBlockGroup,\n ContentModelFormatState,\n DomToModelContext,\n} from 'roosterjs-content-model-types';\n\nimport {\n getRegularSelectionOffsets,\n handleRegularSelection,\n isNodeOfType,\n processChildNode,\n} from 'roosterjs-content-model-dom';\n\n/**\n * Get current format state\n * @param editor The editor to get format from\n */\nexport default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState {\n const pendingFormat = editor.getPendingFormat();\n const model = editor.createContentModel({\n processorOverride: {\n child: reducedModelChildProcessor,\n },\n });\n const manager = editor.getSnapshotsManager();\n const result: ContentModelFormatState = {\n canUndo: manager.hasNewContent || manager.canMove(-1),\n canRedo: manager.canMove(1),\n isDarkMode: editor.isDarkMode(),\n zoomScale: editor.getZoomScale(),\n };\n\n retrieveModelFormatState(model, pendingFormat, result);\n\n return result;\n}\n\n/**\n * @internal\n */\ninterface FormatStateContext extends DomToModelContext {\n /**\n * An optional stack of parent elements to process. When provided, the child nodes of current parent element will be ignored,\n * but use the top element in this stack instead in childProcessor.\n */\n nodeStack?: Node[];\n}\n\n/**\n * @internal\n * Export for test only\n * In order to get format, we can still use the regular child processor. However, to improve performance, we don't need to create\n * content model for the whole doc, instead we only need to traverse the tree path that can arrive current selected node.\n * This \"reduced\" child processor will first create a node stack that stores DOM node from root to current common ancestor node of selection,\n * then use this stack as a faked DOM tree to create a reduced content model which we can use to retrieve format state\n */\nexport function reducedModelChildProcessor(\n group: ContentModelBlockGroup,\n parent: ParentNode,\n context: FormatStateContext\n) {\n if (!context.nodeStack) {\n const selectionRootNode = getSelectionRootNode(context.selection);\n context.nodeStack = selectionRootNode ? createNodeStack(parent, selectionRootNode) : [];\n }\n\n const stackChild = context.nodeStack.pop();\n\n if (stackChild) {\n const [nodeStartOffset, nodeEndOffset] = getRegularSelectionOffsets(context, parent);\n\n // If selection is not on this node, skip getting node index to save some time since we don't need it here\n const index =\n nodeStartOffset >= 0 || nodeEndOffset >= 0 ? getChildIndex(parent, stackChild) : -1;\n\n if (index >= 0) {\n handleRegularSelection(index, context, group, nodeStartOffset, nodeEndOffset);\n }\n\n processChildNode(group, stackChild, context);\n\n if (index >= 0) {\n handleRegularSelection(index + 1, context, group, nodeStartOffset, nodeEndOffset);\n }\n } else {\n // No child node from node stack, that means we have reached the deepest node of selection.\n // Now we can use default child processor to perform full sub tree scanning for content model,\n // So that all selected node will be included.\n context.defaultElementProcessors.child(group, parent, context);\n }\n}\n\nfunction createNodeStack(root: Node, startNode: Node): Node[] {\n const result: Node[] = [];\n let node: Node | null = startNode;\n\n while (node && root != node && root.contains(node)) {\n if (isNodeOfType(node, 'ELEMENT_NODE') && node.tagName == 'TABLE') {\n // For table, we can't do a reduced model creation since we need to handle their cells and indexes,\n // so clean up whatever we already have, and just put table into the stack\n result.splice(0, result.length, node);\n } else {\n result.push(node);\n }\n\n node = node.parentNode;\n }\n\n return result;\n}\n\nfunction getChildIndex(parent: ParentNode, stackChild: Node) {\n let index = 0;\n let child = parent.firstChild;\n\n while (child && child != stackChild) {\n index++;\n child = child.nextSibling;\n }\n return index;\n}\n"]}
1
+ {"version":3,"file":"getFormatState.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/format/getFormatState.ts"],"names":[],"mappings":";;;IAGA;;;OAGG;IACH,SAAwB,cAAc,CAAC,MAAyB;QAC5D,IAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAChD,IAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QACpD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAC7C,IAAM,MAAM,GAA4B;YACpC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE;SAClC,CAAC;QAEF,IAAA,uDAAwB,EAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QAEvD,OAAO,MAAM,CAAC;IAClB,CAAC;IAbD,iCAaC","sourcesContent":["import { retrieveModelFormatState } from 'roosterjs-content-model-core';\r\nimport type { IStandaloneEditor, ContentModelFormatState } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Get current format state\r\n * @param editor The editor to get format from\r\n */\r\nexport default function getFormatState(editor: IStandaloneEditor): ContentModelFormatState {\r\n const pendingFormat = editor.getPendingFormat();\r\n const model = editor.getContentModelCopy('reduced');\r\n const manager = editor.getSnapshotsManager();\r\n const result: ContentModelFormatState = {\r\n canUndo: manager.hasNewContent || manager.canMove(-1),\r\n canRedo: manager.canMove(1),\r\n isDarkMode: editor.isDarkMode(),\r\n };\r\n\r\n retrieveModelFormatState(model, pendingFormat, result);\r\n\r\n return result;\r\n}\r\n"]}
@@ -1,6 +1,6 @@
1
- import type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * Adjust selection to make sure select an image if any
4
- * @return Content Model Image object if an image is select, or null
5
- */
6
- export default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null;
1
+ import type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * Adjust selection to make sure select an image if any
4
+ * @return Content Model Image object if an image is select, or null
5
+ */
6
+ export default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null;
@@ -1,27 +1,27 @@
1
- define(["require", "exports", "../../modelApi/selection/adjustSegmentSelection"], function (require, exports, adjustSegmentSelection_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- /**
5
- * Adjust selection to make sure select an image if any
6
- * @return Content Model Image object if an image is select, or null
7
- */
8
- function adjustImageSelection(editor) {
9
- var image = null;
10
- editor.formatContentModel(function (model) {
11
- return (0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target) {
12
- if (target.isSelected && target.segmentType == 'Image') {
13
- image = target;
14
- return true;
15
- }
16
- else {
17
- return false;
18
- }
19
- }, function (target, ref) { return target == ref; });
20
- }, {
21
- apiName: 'adjustImageSelection',
22
- });
23
- return image;
24
- }
25
- exports.default = adjustImageSelection;
26
- });
1
+ define(["require", "exports", "../../modelApi/selection/adjustSegmentSelection"], function (require, exports, adjustSegmentSelection_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /**
5
+ * Adjust selection to make sure select an image if any
6
+ * @return Content Model Image object if an image is select, or null
7
+ */
8
+ function adjustImageSelection(editor) {
9
+ var image = null;
10
+ editor.formatContentModel(function (model) {
11
+ return (0, adjustSegmentSelection_1.adjustSegmentSelection)(model, function (target) {
12
+ if (target.isSelected && target.segmentType == 'Image') {
13
+ image = target;
14
+ return true;
15
+ }
16
+ else {
17
+ return false;
18
+ }
19
+ }, function (target, ref) { return target == ref; });
20
+ }, {
21
+ apiName: 'adjustImageSelection',
22
+ });
23
+ return image;
24
+ }
25
+ exports.default = adjustImageSelection;
26
+ });
27
27
  //# sourceMappingURL=adjustImageSelection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adjustImageSelection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/adjustImageSelection.ts"],"names":[],"mappings":";;;IAGA;;;OAGG;IACH,SAAwB,oBAAoB,CAAC,MAAyB;QAClE,IAAI,KAAK,GAA6B,IAAI,CAAC;QAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,OAAA,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAA,MAAM;gBACF,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;oBACpD,KAAK,GAAG,MAAM,CAAC;oBACf,OAAO,IAAI,CAAC;iBACf;qBAAM;oBACH,OAAO,KAAK,CAAC;iBAChB;YACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;QAXD,CAWC,EACL;YACI,OAAO,EAAE,sBAAsB;SAClC,CACJ,CAAC;QAEF,OAAO,KAAK,CAAC;IACjB,CAAC;IAvBD,uCAuBC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Adjust selection to make sure select an image if any\n * @return Content Model Image object if an image is select, or null\n */\nexport default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null {\n let image: ContentModelImage | null = null;\n\n editor.formatContentModel(\n model =>\n adjustSegmentSelection(\n model,\n target => {\n if (target.isSelected && target.segmentType == 'Image') {\n image = target;\n return true;\n } else {\n return false;\n }\n },\n (target, ref) => target == ref\n ),\n {\n apiName: 'adjustImageSelection',\n }\n );\n\n return image;\n}\n"]}
1
+ {"version":3,"file":"adjustImageSelection.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/adjustImageSelection.ts"],"names":[],"mappings":";;;IAGA;;;OAGG;IACH,SAAwB,oBAAoB,CAAC,MAAyB;QAClE,IAAI,KAAK,GAA6B,IAAI,CAAC;QAE3C,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;YACD,OAAA,IAAA,+CAAsB,EAClB,KAAK,EACL,UAAA,MAAM;gBACF,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,WAAW,IAAI,OAAO,EAAE;oBACpD,KAAK,GAAG,MAAM,CAAC;oBACf,OAAO,IAAI,CAAC;iBACf;qBAAM;oBACH,OAAO,KAAK,CAAC;iBAChB;YACL,CAAC,EACD,UAAC,MAAM,EAAE,GAAG,IAAK,OAAA,MAAM,IAAI,GAAG,EAAb,CAAa,CACjC;QAXD,CAWC,EACL;YACI,OAAO,EAAE,sBAAsB;SAClC,CACJ,CAAC;QAEF,OAAO,KAAK,CAAC;IACjB,CAAC;IAvBD,uCAuBC","sourcesContent":["import { adjustSegmentSelection } from '../../modelApi/selection/adjustSegmentSelection';\r\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Adjust selection to make sure select an image if any\r\n * @return Content Model Image object if an image is select, or null\r\n */\r\nexport default function adjustImageSelection(editor: IStandaloneEditor): ContentModelImage | null {\r\n let image: ContentModelImage | null = null;\r\n\r\n editor.formatContentModel(\r\n model =>\r\n adjustSegmentSelection(\r\n model,\r\n target => {\r\n if (target.isSelected && target.segmentType == 'Image') {\r\n image = target;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n },\r\n (target, ref) => target == ref\r\n ),\r\n {\r\n apiName: 'adjustImageSelection',\r\n }\r\n );\r\n\r\n return image;\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
- import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * Change the selected image src
4
- * @param editor The editor instance
5
- * @param file The image file
6
- */
7
- export default function changeImage(editor: IStandaloneEditor, file: File): void;
1
+ import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * Change the selected image src
4
+ * @param editor The editor instance
5
+ * @param file The image file
6
+ */
7
+ export default function changeImage(editor: IStandaloneEditor, file: File): void;
@@ -1,35 +1,35 @@
1
- define(["require", "exports", "../utils/formatImageWithContentModel", "roosterjs-content-model-core"], function (require, exports, formatImageWithContentModel_1, roosterjs_content_model_core_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- /**
5
- * Change the selected image src
6
- * @param editor The editor instance
7
- * @param file The image file
8
- */
9
- function changeImage(editor, file) {
10
- editor.focus();
11
- var selection = editor.getDOMSelection();
12
- (0, roosterjs_content_model_core_1.readFile)(file, function (dataUrl) {
13
- if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
14
- (0, formatImageWithContentModel_1.default)(editor, 'changeImage', function (image) {
15
- var _a, _b;
16
- var originalSrc = (_b = (_a = (0, roosterjs_content_model_core_1.updateImageMetadata)(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
17
- var previousSrc = image.src;
18
- image.src = dataUrl;
19
- image.dataset = {};
20
- image.format.width = '';
21
- image.format.height = '';
22
- image.alt = '';
23
- editor.triggerEvent('editImage', {
24
- image: selection.image,
25
- previousSrc: previousSrc,
26
- newSrc: dataUrl,
27
- originalSrc: originalSrc,
28
- });
29
- });
30
- }
31
- });
32
- }
33
- exports.default = changeImage;
34
- });
1
+ define(["require", "exports", "../utils/formatImageWithContentModel", "roosterjs-content-model-core"], function (require, exports, formatImageWithContentModel_1, roosterjs_content_model_core_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /**
5
+ * Change the selected image src
6
+ * @param editor The editor instance
7
+ * @param file The image file
8
+ */
9
+ function changeImage(editor, file) {
10
+ editor.focus();
11
+ var selection = editor.getDOMSelection();
12
+ (0, roosterjs_content_model_core_1.readFile)(file, function (dataUrl) {
13
+ if (dataUrl && !editor.isDisposed() && (selection === null || selection === void 0 ? void 0 : selection.type) === 'image') {
14
+ (0, formatImageWithContentModel_1.default)(editor, 'changeImage', function (image) {
15
+ var _a, _b;
16
+ var originalSrc = (_b = (_a = (0, roosterjs_content_model_core_1.updateImageMetadata)(image)) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
17
+ var previousSrc = image.src;
18
+ image.src = dataUrl;
19
+ image.dataset = {};
20
+ image.format.width = '';
21
+ image.format.height = '';
22
+ image.alt = '';
23
+ editor.triggerEvent('editImage', {
24
+ image: selection.image,
25
+ previousSrc: previousSrc,
26
+ newSrc: dataUrl,
27
+ originalSrc: originalSrc,
28
+ });
29
+ });
30
+ }
31
+ });
32
+ }
33
+ exports.default = changeImage;
34
+ });
35
35
  //# sourceMappingURL=changeImage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"changeImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/changeImage.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,WAAW,CAAC,MAAyB,EAAE,IAAU;QACrE,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3C,IAAA,uCAAQ,EAAC,IAAI,EAAE,UAAA,OAAO;YAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;gBAChE,IAAA,qCAA2B,EAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;oBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,IAAA,kDAAmB,EAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;oBAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;oBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;oBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;oBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;oBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;oBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;oBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;wBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;wBACtB,WAAW,aAAA;wBACX,MAAM,EAAE,OAAO;wBACf,WAAW,aAAA;qBACd,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;aACN;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAzBD,8BAyBC","sourcesContent":["import formatImageWithContentModel from '../utils/formatImageWithContentModel';\nimport { readFile, updateImageMetadata } from 'roosterjs-content-model-core';\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\n\n/**\n * Change the selected image src\n * @param editor The editor instance\n * @param file The image file\n */\nexport default function changeImage(editor: IStandaloneEditor, file: File) {\n editor.focus();\n\n const selection = editor.getDOMSelection();\n readFile(file, dataUrl => {\n if (dataUrl && !editor.isDisposed() && selection?.type === 'image') {\n formatImageWithContentModel(editor, 'changeImage', (image: ContentModelImage) => {\n const originalSrc = updateImageMetadata(image)?.src ?? '';\n const previousSrc = image.src;\n\n image.src = dataUrl;\n image.dataset = {};\n image.format.width = '';\n image.format.height = '';\n image.alt = '';\n\n editor.triggerEvent('editImage', {\n image: selection.image,\n previousSrc,\n newSrc: dataUrl,\n originalSrc,\n });\n });\n }\n });\n}\n"]}
1
+ {"version":3,"file":"changeImage.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-api/lib/publicApi/image/changeImage.ts"],"names":[],"mappings":";;;IAIA;;;;OAIG;IACH,SAAwB,WAAW,CAAC,MAAyB,EAAE,IAAU;QACrE,MAAM,CAAC,KAAK,EAAE,CAAC;QAEf,IAAM,SAAS,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;QAC3C,IAAA,uCAAQ,EAAC,IAAI,EAAE,UAAA,OAAO;YAClB,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,MAAK,OAAO,EAAE;gBAChE,IAAA,qCAA2B,EAAC,MAAM,EAAE,aAAa,EAAE,UAAC,KAAwB;;oBACxE,IAAM,WAAW,GAAG,MAAA,MAAA,IAAA,kDAAmB,EAAC,KAAK,CAAC,0CAAE,GAAG,mCAAI,EAAE,CAAC;oBAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC;oBAE9B,KAAK,CAAC,GAAG,GAAG,OAAO,CAAC;oBACpB,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;oBACnB,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;oBACxB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;oBACzB,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC;oBAEf,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE;wBAC7B,KAAK,EAAE,SAAS,CAAC,KAAK;wBACtB,WAAW,aAAA;wBACX,MAAM,EAAE,OAAO;wBACf,WAAW,aAAA;qBACd,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;aACN;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAzBD,8BAyBC","sourcesContent":["import formatImageWithContentModel from '../utils/formatImageWithContentModel';\r\nimport { readFile, updateImageMetadata } from 'roosterjs-content-model-core';\r\nimport type { ContentModelImage, IStandaloneEditor } from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Change the selected image src\r\n * @param editor The editor instance\r\n * @param file The image file\r\n */\r\nexport default function changeImage(editor: IStandaloneEditor, file: File) {\r\n editor.focus();\r\n\r\n const selection = editor.getDOMSelection();\r\n readFile(file, dataUrl => {\r\n if (dataUrl && !editor.isDisposed() && selection?.type === 'image') {\r\n formatImageWithContentModel(editor, 'changeImage', (image: ContentModelImage) => {\r\n const originalSrc = updateImageMetadata(image)?.src ?? '';\r\n const previousSrc = image.src;\r\n\r\n image.src = dataUrl;\r\n image.dataset = {};\r\n image.format.width = '';\r\n image.format.height = '';\r\n image.alt = '';\r\n\r\n editor.triggerEvent('editImage', {\r\n image: selection.image,\r\n previousSrc,\r\n newSrc: dataUrl,\r\n originalSrc,\r\n });\r\n });\r\n }\r\n });\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
- import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
- /**
3
- * Insert an image into current selected position
4
- * @param editor The editor to operate on
5
- * @param file Image Blob file or source string
6
- */
7
- export default function insertImage(editor: IStandaloneEditor, imageFileOrSrc: File | string): void;
1
+ import type { IStandaloneEditor } from 'roosterjs-content-model-types';
2
+ /**
3
+ * Insert an image into current selected position
4
+ * @param editor The editor to operate on
5
+ * @param file Image Blob file or source string
6
+ */
7
+ export default function insertImage(editor: IStandaloneEditor, imageFileOrSrc: File | string): void;