devexpress-richedit 24.1.11 → 24.1.12-build-25093-0104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/gulpfile.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (gulpfile.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (index-custom.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (localization-builder.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (nspell-index.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (nspell.webpack.config.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (webpack-externals.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (webpack.config.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (dx.richedit.d.ts)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DevExpress WebRichEdit (dx.richedit.js)
3
- * Version: 24.1.11
3
+ * Version: 24.1.12
4
4
  * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
5
5
  * License: https://www.devexpress.com/Support/EULAs
6
6
  */
@@ -19609,7 +19609,7 @@ class ParagraphStyle extends StyleBase {
19609
19609
  }
19610
19610
  }
19611
19611
  ParagraphStyle.normalStyleName = "Normal";
19612
- ParagraphStyle.headingStyleName = "heading";
19612
+ ParagraphStyle.headingStyleName = "Heading";
19613
19613
  ParagraphStyle.tocStyleName = "toc";
19614
19614
  class TabProperties {
19615
19615
  constructor() {
@@ -92577,6 +92577,7 @@ class LayoutPageArea extends rectangle.Rectangle {
92577
92577
 
92578
92578
 
92579
92579
 
92580
+
92580
92581
  var LayoutRowStateFlags;
92581
92582
  (function (LayoutRowStateFlags) {
92582
92583
  LayoutRowStateFlags[LayoutRowStateFlags["NormallyEnd"] = 0] = "NormallyEnd";
@@ -92587,6 +92588,7 @@ var LayoutRowStateFlags;
92587
92588
  LayoutRowStateFlags[LayoutRowStateFlags["DocumentEnd"] = 16] = "DocumentEnd";
92588
92589
  LayoutRowStateFlags[LayoutRowStateFlags["CellTableEnd"] = 64] = "CellTableEnd";
92589
92590
  LayoutRowStateFlags[LayoutRowStateFlags["PageBreakBefore"] = 128] = "PageBreakBefore";
92591
+ LayoutRowStateFlags[LayoutRowStateFlags["InfinityWidth"] = 256] = "InfinityWidth";
92590
92592
  })(LayoutRowStateFlags || (LayoutRowStateFlags = {}));
92591
92593
  class layout_row_LayoutRow extends rectangle.Rectangle {
92592
92594
  constructor(minY = Number.MAX_SAFE_INTEGER) {
@@ -92702,7 +92704,7 @@ class layout_row_LayoutRow extends rectangle.Rectangle {
92702
92704
  return lastBoxIndexWhatCanStrikeoutAndUnderline;
92703
92705
  }
92704
92706
  containsSpacesOnly() {
92705
- return this.boxes.length > 0 && utils_list.ListUtils.allOf(this.boxes, val => val.isWhitespace());
92707
+ return this.boxes.length > 0 && utils_list.ListUtils.allOf(this.boxes, val => val.isWhitespace() || val.getType() === LayoutBoxType.ParagraphMark);
92706
92708
  }
92707
92709
  }
92708
92710
  class LayoutRowWithIndex extends (/* unused pure expression or super */ null && (layout_row_LayoutRow)) {
@@ -93806,7 +93808,8 @@ class RowFormatterResult {
93806
93808
  return;
93807
93809
  this.rowFormatter.tabInfo.shiftBoxesAfterLastTab();
93808
93810
  const dontJustifyLinesEndingInSoftLineBreak = this.rowFormatter.manager.model.compatibilitySettings.dontJustifyLinesEndingInSoftLineBreak;
93809
- BoxAligner.align(this.row, this.rowFormatter.paragraphProps.alignment, currLogicRowEndPos, this.rowBoxIndexStart, dontJustifyLinesEndingInSoftLineBreak);
93811
+ if (!this.row.flags.get(LayoutRowStateFlags.InfinityWidth))
93812
+ BoxAligner.align(this.row, this.rowFormatter.paragraphProps.alignment, currLogicRowEndPos, this.rowBoxIndexStart, dontJustifyLinesEndingInSoftLineBreak);
93810
93813
  this.rowBoxIndexStart = this.row.boxes.length;
93811
93814
  }
93812
93815
  deleteSomeAnchorObjects(index, posToRestart) {
@@ -95506,6 +95509,7 @@ class RowEndedWithPageBreakState extends RowEndedWithParagraphMarkFormatterState
95506
95509
 
95507
95510
 
95508
95511
 
95512
+
95509
95513
  class RowTabInfo {
95510
95514
  constructor(rowFormatter, paragraphHorizontalBoundsStart) {
95511
95515
  this.rowFormatter = rowFormatter;
@@ -95576,9 +95580,10 @@ class RowTabInfo {
95576
95580
  if (tabXPosRelativePage > lastInterval.end) {
95577
95581
  if (lastInterval.end < this.rowFormatter.paragraphHorizontalBounds.end) {
95578
95582
  if (this.rowFormatter.manager.model.compatibilitySettings.compatibilityMode < CompatibilityMode.Word2013) {
95583
+ this.currInterval.avaliableWidth = Number.MAX_SAFE_INTEGER - this.currInterval.busyWidth;
95579
95584
  this.currInterval.length = Number.MAX_SAFE_INTEGER;
95580
- this.currInterval.avaliableWidth = Number.MAX_SAFE_INTEGER;
95581
95585
  this.row.width = Number.MAX_SAFE_INTEGER;
95586
+ this.row.flags.set(LayoutRowStateFlags.InfinityWidth, true);
95582
95587
  return this.addTabBox();
95583
95588
  }
95584
95589
  else if (tabBox.right < this.rowFormatter.paragraphHorizontalBounds.end) {
@@ -122271,6 +122276,44 @@ function createInnerItems(items) {
122271
122276
  }
122272
122277
  }
122273
122278
 
122279
+ ;// CONCATENATED MODULE: ./src/client/utils/focus-helper.ts
122280
+ class FocusHelper {
122281
+ static preventFocusOnClick(element) {
122282
+ return new FocusBlocker(element);
122283
+ }
122284
+ }
122285
+ class FocusBlocker {
122286
+ constructor(target) {
122287
+ this.target = target;
122288
+ this.onPointerDownBinded = this.onPointerDown.bind(this);
122289
+ this.addEventListeners(target);
122290
+ }
122291
+ addEventListeners(element) {
122292
+ element.addEventListener("pointerdown", this.onPointerDownBinded);
122293
+ }
122294
+ removeEventListeners(element) {
122295
+ element.removeEventListener("pointerdown", this.onPointerDownBinded);
122296
+ }
122297
+ onPointerDown(event) {
122298
+ for (const element of event.composedPath()) {
122299
+ if (!(element instanceof HTMLElement))
122300
+ continue;
122301
+ if (element === this.target) {
122302
+ event.preventDefault();
122303
+ break;
122304
+ }
122305
+ if (!this.target.contains(element) || element.tabIndex > -1)
122306
+ break;
122307
+ }
122308
+ }
122309
+ dispose() {
122310
+ if (this.target) {
122311
+ this.removeEventListeners(this.target);
122312
+ this.target = null;
122313
+ }
122314
+ }
122315
+ }
122316
+
122274
122317
  ;// CONCATENATED MODULE: ./src/client/bars/ribbon.ts
122275
122318
 
122276
122319
 
@@ -122280,6 +122323,7 @@ function createInnerItems(items) {
122280
122323
 
122281
122324
 
122282
122325
 
122326
+
122283
122327
  class ClientRibbonBar extends RibbonBarBase {
122284
122328
  constructor(ownerControl, ownerElement, apiRibbon, fonts) {
122285
122329
  var _a;
@@ -122288,6 +122332,7 @@ class ClientRibbonBar extends RibbonBarBase {
122288
122332
  this.ownerElement = ownerElement;
122289
122333
  this.init(apiRibbon, fonts);
122290
122334
  this.createControl((_a = apiRibbon.activeTabIndex) !== null && _a !== void 0 ? _a : 1);
122335
+ this.focusHandler = FocusHelper.preventFocusOnClick(this.ribbon.element);
122291
122336
  }
122292
122337
  updateContextItem(_commandKey) {
122293
122338
  }
@@ -122313,13 +122358,13 @@ class ClientRibbonBar extends RibbonBarBase {
122313
122358
  }
122314
122359
  dispose() {
122315
122360
  this.ribbon.dispose();
122361
+ this.focusHandler.dispose();
122316
122362
  }
122317
122363
  checkActivateHeaderFooter(_selection) {
122318
122364
  return false;
122319
122365
  }
122320
122366
  createControl(activeTabIndex) {
122321
122367
  const element = document.createElement('div');
122322
- element.tabIndex = 0;
122323
122368
  const firstChild = this.ownerElement.firstChild;
122324
122369
  if (firstChild)
122325
122370
  this.ownerElement.insertBefore(element, firstChild);
@@ -129268,7 +129313,6 @@ class LinkHeaderFooterToPreviousCommand extends HeaderFooterCommandBase {
129268
129313
 
129269
129314
 
129270
129315
 
129271
-
129272
129316
  class ApplyStyleCommand extends CommandBase {
129273
129317
  getState() {
129274
129318
  var interval = this.selection.lastSelectedInterval.clone();
@@ -129305,16 +129349,19 @@ class ApplyStyleCommand extends CommandBase {
129305
129349
  getStyleName(style) {
129306
129350
  return style.styleName;
129307
129351
  }
129352
+ DEPRECATEDConvertOptionsParameter(parameter) {
129353
+ return typeof parameter === 'string' ? { styleName: parameter } : parameter;
129354
+ }
129308
129355
  executeCore(state, options) {
129309
129356
  const parameter = options.param;
129310
- if (utils_string.StringUtils.isNullOrEmpty(parameter))
129357
+ if (utils_string.StringUtils.isNullOrEmpty(parameter.styleName))
129311
129358
  return false;
129312
- let interval = state.interval.clone();
129359
+ const subDocumentInterval = new SubDocumentInterval(options.subDocument, state.interval.clone());
129313
129360
  let executed = true;
129314
129361
  let isPresetStyle = false;
129315
129362
  this.history.beginTransaction();
129316
- if (StylesManager.isParagraphStyle(parameter) && state.paragraphStyleChangeEnabled) {
129317
- const styleName = StylesManager.getStyleNameWithoutPrefix(parameter);
129363
+ if (StylesManager.isParagraphStyle(parameter.styleName) && state.paragraphStyleChangeEnabled) {
129364
+ const styleName = StylesManager.getStyleNameWithoutPrefix(parameter.styleName);
129318
129365
  let paragraphStyle = this.control.modelManager.model.getParagraphStyleByName(styleName);
129319
129366
  if (!paragraphStyle) {
129320
129367
  const presetStyle = StylesManager.getPresetParagraphStyleByName(styleName);
@@ -129323,12 +129370,12 @@ class ApplyStyleCommand extends CommandBase {
129323
129370
  paragraphStyle = StylesManager.getPresetParagraphStyleByName(styleName).clone();
129324
129371
  isPresetStyle = true;
129325
129372
  }
129326
- this.applyParagraphStyle(interval, paragraphStyle, isPresetStyle, options.subDocument);
129373
+ this.applyParagraphStyle(subDocumentInterval, paragraphStyle, isPresetStyle, parameter.keepDirectFormatting);
129327
129374
  }
129328
- else if (!StylesManager.isParagraphStyle(parameter) && state.characterStyleChangeEnabled) {
129329
- const styleName = StylesManager.getStyleNameWithoutPrefix(parameter);
129330
- if (interval.length == 0)
129331
- interval = options.subDocument.getWholeWordInterval(interval.start);
129375
+ else if (!StylesManager.isParagraphStyle(parameter.styleName) && state.characterStyleChangeEnabled) {
129376
+ const styleName = StylesManager.getStyleNameWithoutPrefix(parameter.styleName);
129377
+ if (subDocumentInterval.interval.length == 0)
129378
+ subDocumentInterval.interval = options.subDocument.getWholeWordInterval(subDocumentInterval.interval.start);
129332
129379
  let characterStyle = this.control.modelManager.model.getCharacterStyleByName(styleName);
129333
129380
  if (!characterStyle) {
129334
129381
  const presetStyle = StylesManager.getPresetCharacterStyleByName(styleName);
@@ -129337,9 +129384,9 @@ class ApplyStyleCommand extends CommandBase {
129337
129384
  characterStyle = presetStyle.clone();
129338
129385
  isPresetStyle = true;
129339
129386
  }
129340
- if (interval.length == 0) {
129387
+ if (subDocumentInterval.interval.length == 0) {
129341
129388
  if (isPresetStyle) {
129342
- let fontInfo = characterStyle.maskedCharacterProperties.fontInfo;
129389
+ const fontInfo = characterStyle.maskedCharacterProperties.fontInfo;
129343
129390
  if (fontInfo && fontInfo.measurer === undefined)
129344
129391
  characterStyle.maskedCharacterProperties.fontInfo = this.control.modelManager.model.cache.fontInfoCache.getItemByName(fontInfo.name);
129345
129392
  }
@@ -129347,50 +129394,56 @@ class ApplyStyleCommand extends CommandBase {
129347
129394
  executed = false;
129348
129395
  }
129349
129396
  else
129350
- this.applyCharacterStyle(interval, characterStyle, isPresetStyle, options.subDocument);
129397
+ this.applyCharacterStyle(subDocumentInterval, characterStyle, isPresetStyle);
129351
129398
  }
129352
129399
  this.history.endTransaction();
129353
129400
  return executed;
129354
129401
  }
129355
- applyCharacterStyle(interval, style, isPresetStyle, subDocument) {
129402
+ applyCharacterStyle(subDocumentInterval, style, isPresetStyle) {
129356
129403
  if (ControlOptions.isEnabled(this.control.modelManager.richOptions.control.characterStyle)) {
129357
- this.modelManipulator.style.applyCharacterStyle(new SubDocumentInterval(subDocument, interval), isPresetStyle ? this.control.modelManager.model.stylesManager.addCharacterStyle(style) : style, false);
129404
+ const characterStyle = isPresetStyle ? this.control.modelManager.model.stylesManager.addCharacterStyle(style) : style;
129405
+ this.modelManipulator.style.applyCharacterStyle(subDocumentInterval, characterStyle, false);
129358
129406
  }
129359
129407
  }
129360
- applyParagraphStyle(interval, style, isPresetStyle, subDocument) {
129361
- var count = this.calculateAffectedParagraphCount(interval, subDocument);
129408
+ applyParagraphStyle(subDocumentInterval, style, isPresetStyle, keepDirectFormatting = false) {
129409
+ const count = this.calculateAffectedParagraphCount(subDocumentInterval);
129362
129410
  if (count > 0 && ControlOptions.isEnabled(this.control.modelManager.richOptions.control.paragraphStyle)) {
129363
- var paragraphIndex = search.SearchUtils.normedInterpolationIndexOf(subDocument.paragraphs, p => p.startLogPosition.value, interval.start);
129364
- for (var i = 0; i < count; i++) {
129365
- var paragraph = subDocument.paragraphs[paragraphIndex + i];
129366
- var paragraphInterval = new fixed.FixedInterval(paragraph.startLogPosition.value, paragraph.length);
129367
- var modelManipulator = this.modelManipulator;
129368
- this.history.addAndRedo(new ApplyParagraphStyleHistoryItem(modelManipulator, new SubDocumentInterval(subDocument, paragraphInterval), isPresetStyle ? modelManipulator.model.stylesManager.addParagraphStyle(style) : style));
129369
- this.history.addAndRedo(new ParagraphUseValueHistoryItem(modelManipulator, new SubDocumentInterval(subDocument, paragraphInterval), 0));
129370
- this.history.addAndRedo(new FontUseValueHistoryItem(modelManipulator, new SubDocumentInterval(subDocument, paragraphInterval), 0));
129371
- this.history.addAndRedo(new AddParagraphToListHistoryItem(this.modelManipulator, subDocument, paragraphIndex, NumberingList.NumberingListNotSettedIndex, -1));
129411
+ const { interval, subDocument } = subDocumentInterval;
129412
+ const paragraphs = subDocument.paragraphs;
129413
+ const paragraphIndex = search.SearchUtils.normedInterpolationIndexOf(paragraphs, p => p.startLogPosition.value, interval.start);
129414
+ for (let i = 0; i < count; i++) {
129415
+ const paragraph = paragraphs[paragraphIndex + i];
129416
+ const modelManipulator = this.modelManipulator;
129417
+ const paragraphSubDocumentInterval = new SubDocumentInterval(subDocument, paragraph.interval);
129418
+ style = isPresetStyle ? modelManipulator.model.stylesManager.addParagraphStyle(style) : style;
129419
+ this.history.addAndRedo(new ApplyParagraphStyleHistoryItem(modelManipulator, paragraphSubDocumentInterval, style));
129420
+ this.history.addAndRedo(new ParagraphUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0));
129421
+ if (!keepDirectFormatting)
129422
+ this.history.addAndRedo(new FontUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0));
129423
+ this.history.addAndRedo(new AddParagraphToListHistoryItem(modelManipulator, subDocument, paragraphIndex, NumberingList.NumberingListNotSettedIndex, -1));
129372
129424
  }
129373
129425
  }
129374
129426
  else
129375
- this.applyParagraphLinkedStyle(interval, style, isPresetStyle, subDocument);
129427
+ this.applyParagraphLinkedStyle(subDocumentInterval, style, isPresetStyle);
129376
129428
  }
129377
- applyParagraphLinkedStyle(interval, style, isPresetStyle, subDocument) {
129429
+ applyParagraphLinkedStyle(subDocumentInterval, style, isPresetStyle) {
129378
129430
  if (ControlOptions.isEnabled(this.control.modelManager.richOptions.control.characterStyle)) {
129379
129431
  if (!style.linkedStyle)
129380
- this.createCharacterStyle(style);
129381
- this.applyCharacterStyle(interval, style.linkedStyle, isPresetStyle, subDocument);
129432
+ this.addLinkedCharacterStyle(style);
129433
+ this.applyCharacterStyle(subDocumentInterval, style.linkedStyle, isPresetStyle);
129382
129434
  }
129383
129435
  }
129384
- createCharacterStyle(paragraphStyle) {
129385
- var style = new CharacterStyle(paragraphStyle.styleName + " Char", paragraphStyle.localizedName + " Char", false, false, false, false, paragraphStyle.maskedCharacterProperties);
129436
+ addLinkedCharacterStyle(paragraphStyle) {
129437
+ const style = new CharacterStyle(paragraphStyle.styleName + " Char", paragraphStyle.localizedName + " Char", false, false, false, false, paragraphStyle.maskedCharacterProperties);
129386
129438
  this.history.addAndRedo(new CreateStyleLinkHistoryItem(this.modelManipulator, style, paragraphStyle));
129387
129439
  }
129388
- calculateAffectedParagraphCount(interval, subDocument) {
129389
- var paragraphs = subDocument.getParagraphsByInterval(interval);
129440
+ calculateAffectedParagraphCount(subDocumentInterval) {
129441
+ const { interval, subDocument } = subDocumentInterval;
129442
+ const paragraphs = subDocument.getParagraphsByInterval(interval);
129390
129443
  if (paragraphs.length > 1)
129391
129444
  return paragraphs.length;
129392
- var paragraph = paragraphs[0];
129393
- var lastParagraphCharSelected = interval.length >= paragraph.length - 1;
129445
+ const paragraph = paragraphs[0];
129446
+ const lastParagraphCharSelected = interval.length >= paragraph.length - 1;
129394
129447
  if (interval.start === paragraph.startLogPosition.value && lastParagraphCharSelected || interval.length === 0)
129395
129448
  return 1;
129396
129449
  return 0;
@@ -135884,24 +135937,30 @@ class RemoveNextWordCommand extends RemoveWordCommandBase {
135884
135937
 
135885
135938
 
135886
135939
  class SetParagraphLevelCommandBase extends CommandBase {
135940
+ get commandManager() { return this.control.commandManager; }
135941
+ get modelManager() { return this.control.modelManager; }
135887
135942
  isEnabled() {
135888
- return super.isEnabled() && ControlOptions.isEnabled(this.control.modelManager.richOptions.control.paragraphFormatting);
135943
+ return super.isEnabled() && ControlOptions.isEnabled(this.modelManager.richOptions.control.paragraphFormatting);
135889
135944
  }
135890
135945
  getState() {
135891
135946
  const state = new SimpleCommandState(this.isEnabled());
135892
- state.value = this.control.commandManager.getCommand(RichEditClientCommand.ChangeHeadingLevel).getState().value == this.getLevel(null);
135947
+ state.value = this.commandManager.getCommand(RichEditClientCommand.ChangeHeadingLevel).getState().value == this.getLevel(null);
135893
135948
  return state;
135894
135949
  }
135895
135950
  executeCore(_state, options) {
135896
135951
  const level = this.getLevel(options.param);
135897
135952
  const styleName = level > 0 ? `${ParagraphStyle.headingStyleName} ${level}` : ParagraphStyle.normalStyleName;
135898
- let paragraphStyle = this.control.modelManager.model.getParagraphStyleByName(styleName);
135953
+ let paragraphStyle = this.modelManager.model.getParagraphStyleByName(styleName);
135899
135954
  if (!paragraphStyle)
135900
135955
  paragraphStyle = StylesManager.getPresetParagraphStyleByName(styleName);
135901
- if (paragraphStyle)
135902
- this.control.commandManager.getCommand(RichEditClientCommand.ChangeStyle).execute(this.control.commandManager.isPublicApiCall, new CommandSimpleOptions(this.control, StylesManager.paragraphPrefix + styleName));
135903
- else
135904
- this.control.commandManager.getCommand(RichEditClientCommand.ChangeHeadingLevel).execute(this.control.commandManager.isPublicApiCall, new CommandSimpleOptions(this.control, level));
135956
+ if (paragraphStyle) {
135957
+ const commandOptions = new CommandSimpleOptions(this.control, { styleName: StylesManager.paragraphPrefix + styleName, keepDirectFormatting: true });
135958
+ this.commandManager.getCommand(RichEditClientCommand.ChangeStyle).execute(this.commandManager.isPublicApiCall, commandOptions);
135959
+ }
135960
+ else {
135961
+ const commandOptions = new CommandSimpleOptions(this.control, level);
135962
+ this.commandManager.getCommand(RichEditClientCommand.ChangeHeadingLevel).execute(this.commandManager.isPublicApiCall, commandOptions);
135963
+ }
135905
135964
  return true;
135906
135965
  }
135907
135966
  getRelatedCommands() {