devexpress-richedit 25.1.1-alpha → 25.1.3
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 +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +1 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.css +1 -1
- package/dist/dx.richedit.d.ts +1 -2
- package/dist/dx.richedit.js +1732 -1362
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/client-rich-edit.js +3 -3
- package/lib/client/commands/commands.js +0 -3
- package/lib/client/commands/mail-merge-command.js +2 -1
- package/lib/client/formats/docx/export/data.d.ts +5 -1
- package/lib/client/formats/docx/export/data.js +3 -2
- package/lib/client/formats/docx/export/exporter.d.ts +2 -3
- package/lib/client/formats/docx/export/exporter.js +3 -3
- package/lib/client/formats/docx/export/exporters/base/sections.d.ts +0 -1
- package/lib/client/formats/docx/export/exporters/base/sections.js +2 -10
- package/lib/client/formats/docx/export/exporters/base/table/table.d.ts +1 -1
- package/lib/client/formats/docx/export/exporters/base/table/table.js +4 -4
- package/lib/client/formats/docx/import/destination/paragraph-properties/properties/paragraph-spacing-destination.js +6 -4
- package/lib/client/model-api/character-properties.js +13 -17
- package/lib/client/model-api/document.js +2 -0
- package/lib/client/model-api/formats/exporter.js +2 -2
- package/lib/client/model-api/images/images.js +1 -1
- package/lib/client/model-api/sub-document.js +1 -1
- package/lib/client/public/commands/enum.d.ts +1 -2
- package/lib/client/public/commands/enum.js +0 -1
- package/lib/client/public/options.d.ts +1 -0
- package/lib/client/public/rich-edit.js +2 -2
- package/lib/client/utils/focus-helper.js +22 -5
- package/lib/common/canvas/canvas-manager.js +38 -24
- package/lib/common/canvas/canvas-scroll-info.d.ts +6 -3
- package/lib/common/canvas/canvas-scroll-info.js +9 -4
- package/lib/common/canvas/canvas-scroll-manager.d.ts +4 -1
- package/lib/common/canvas/canvas-scroll-manager.js +28 -20
- package/lib/common/canvas/canvas-size-info.d.ts +4 -2
- package/lib/common/canvas/canvas-size-info.js +3 -5
- package/lib/common/canvas/renderes/canvas-listener/print-layout-view-canvas-listener.js +2 -2
- package/lib/common/canvas/renderes/common/document-renderer.d.ts +4 -1
- package/lib/common/canvas/renderes/common/document-renderer.js +15 -12
- package/lib/common/canvas/renderes/view-manager.d.ts +5 -1
- package/lib/common/canvas/renderes/view-manager.js +16 -7
- package/lib/common/commands/client-command.d.ts +1 -2
- package/lib/common/commands/client-command.js +0 -1
- package/lib/common/commands/command-manager.js +0 -2
- package/lib/common/commands/document/print-document-on-client-command.d.ts +2 -0
- package/lib/common/commands/document/print-document-on-client-command.js +46 -18
- package/lib/common/commands/layout/apply-style-command.d.ts +2 -2
- package/lib/common/commands/layout/apply-style-command.js +3 -4
- package/lib/common/commands/toc/set-paragraph-level-command.js +1 -1
- package/lib/common/formats/i-document-exporter.d.ts +3 -0
- package/lib/common/formats/rtf/export/exporter.d.ts +2 -3
- package/lib/common/formats/rtf/export/exporter.js +3 -3
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.d.ts +4 -2
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.js +13 -9
- package/lib/common/formats/rtf/export/exporters/table/rtf-table-exporter.d.ts +3 -2
- package/lib/common/formats/rtf/export/exporters/table/rtf-table-exporter.js +4 -4
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-nested-table-exporter-state.d.ts +2 -1
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-nested-table-exporter-state.js +2 -2
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state-base.d.ts +4 -2
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state-base.js +16 -9
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state.d.ts +2 -1
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state.js +2 -2
- package/lib/common/formats/rtf/import/table/normalization/apply-use-values.d.ts +6 -0
- package/lib/common/formats/rtf/import/table/normalization/apply-use-values.js +90 -0
- package/lib/common/formats/rtf/import/table/table-converter.js +7 -2
- package/lib/common/formats/rtf/importer-in-subdocument.d.ts +1 -2
- package/lib/common/formats/rtf/importer-in-subdocument.js +4 -3
- package/lib/common/input-controller.d.ts +5 -5
- package/lib/common/input-controller.js +16 -12
- package/lib/common/layout/document-layout.d.ts +5 -0
- package/lib/common/layout/document-layout.js +13 -0
- package/lib/common/layout/main-structures/layout-page-area.d.ts +3 -0
- package/lib/common/layout/main-structures/layout-page-area.js +6 -0
- package/lib/common/layout/main-structures/layout-page.d.ts +3 -0
- package/lib/common/layout/main-structures/layout-page.js +8 -0
- package/lib/common/layout/main-structures/layout-row.js +1 -2
- package/lib/common/layout-formatter/floating/position-calculators/horizontal.d.ts +1 -0
- package/lib/common/layout-formatter/floating/position-calculators/horizontal.js +16 -12
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.d.ts +4 -1
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +36 -2
- package/lib/common/layout-formatter/row/states.js +0 -2
- package/lib/common/layout-formatter/row/tab-info.js +5 -4
- package/lib/common/layout-formatter/row/word-holder.js +1 -1
- package/lib/common/layout-formatter/table/info/table-info.d.ts +0 -1
- package/lib/common/layout-formatter/table/info/table-info.js +2 -18
- package/lib/common/layout-formatter/table/size-compressor.js +9 -2
- package/lib/common/layout-formatter/table/table-alignment-applier.js +0 -2
- package/lib/common/model/borders/border-info.js +1 -1
- package/lib/common/model/caches/images.d.ts +4 -1
- package/lib/common/model/caches/images.js +6 -2
- package/lib/common/model/changes/change.d.ts +2 -1
- package/lib/common/model/changes/enums.d.ts +2 -1
- package/lib/common/model/changes/enums.js +1 -0
- package/lib/common/model/changes/model/zoom-level.d.ts +8 -0
- package/lib/common/model/changes/model/zoom-level.js +8 -0
- package/lib/common/model/character/character-properties.d.ts +1 -1
- package/lib/common/model/character/character-properties.js +14 -2
- package/lib/common/model/creator/creator.js +6 -0
- package/lib/common/model/fields/field.d.ts +1 -1
- package/lib/common/model/fields/field.js +4 -3
- package/lib/common/model/fields/tree-creator.js +1 -1
- package/lib/common/model/history/items/character-properties-history-items.d.ts +2 -1
- package/lib/common/model/history/items/character-properties-history-items.js +3 -2
- package/lib/common/model/manipulators/character-properties-manipulator.js +2 -2
- package/lib/common/model/manipulators/i-properties-manipulator.d.ts +1 -1
- package/lib/common/model/manipulators/model-manipulator.d.ts +2 -1
- package/lib/common/model/manipulators/model-manipulator.js +4 -0
- package/lib/common/model/manipulators/picture-manipulator/picture-manipulator.js +2 -2
- package/lib/common/model/options/fonts.d.ts +1 -1
- package/lib/common/model/paragraph/paragraph-style.d.ts +2 -1
- package/lib/common/model/paragraph/paragraph-style.js +2 -1
- package/lib/common/model/tables/secondary-structures/table-base-structures.d.ts +2 -1
- package/lib/common/model/tables/secondary-structures/table-base-structures.js +1 -0
- package/lib/common/mouse-handler/mouse-handler/mouse-handler-default-state.d.ts +1 -1
- package/lib/common/mouse-handler/mouse-handler/mouse-handler-default-state.js +22 -25
- package/lib/common/rich-edit-core.js +18 -18
- package/lib/common/ui/ruler/controls/ruler.js +3 -7
- package/lib/common/ui/ruler/controls/vertical-line.js +2 -1
- package/lib/common/ui/ruler/ruler.js +2 -0
- package/lib/common/utils/mixed-size.d.ts +27 -0
- package/lib/common/utils/mixed-size.js +91 -0
- package/lib/common/utils/size-utils.d.ts +14 -7
- package/lib/common/utils/size-utils.js +43 -18
- package/package.json +3 -3
- package/lib/common/commands/layout/toggle-allow-zoom-command.d.ts +0 -7
- package/lib/common/commands/layout/toggle-allow-zoom-command.js +0 -17
@@ -2,7 +2,9 @@ import { IScrollLayoutChangesListener } from '../interfaces/i-selection-layout-c
|
|
2
2
|
import { ICanvasState } from '../scroll/canvas-states';
|
3
3
|
import { IRulerControl } from '../ui/ruler/ruler';
|
4
4
|
import { ViewManager } from './renderes/view-manager';
|
5
|
-
|
5
|
+
import { IModelChangesListener } from '../interfaces/model-changes-listener';
|
6
|
+
import { ModelChange } from '../model/changes/change';
|
7
|
+
export declare class CanvasScrollManager implements IScrollLayoutChangesListener, IModelChangesListener {
|
6
8
|
private updateScrollTimeoutId;
|
7
9
|
private waitForDblClickTimeoutId;
|
8
10
|
private horizontalRuler;
|
@@ -11,6 +13,7 @@ export declare class CanvasScrollManager implements IScrollLayoutChangesListener
|
|
11
13
|
private get sizes();
|
12
14
|
constructor(viewManager: ViewManager, horizontalRuler: IRulerControl);
|
13
15
|
dispose(): void;
|
16
|
+
modelChanged(change: ModelChange): void;
|
14
17
|
get scrollTop(): number;
|
15
18
|
set scrollTop(val: number);
|
16
19
|
setScrollEnabled(enabled: boolean): void;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { DocumentLayoutDetailsLevel } from '../layout/document-layout-details-level';
|
2
2
|
import { MouseHandler } from '../mouse-handler/mouse-handler/mouse-handler';
|
3
3
|
import { RelativePosition } from '../scroll/model-states';
|
4
|
+
import { MixedSize } from '../utils/mixed-size';
|
5
|
+
import { ModelChangeType } from '../model/changes/enums';
|
4
6
|
export class CanvasScrollManager {
|
5
7
|
get canvas() { return this.viewManager.canvas; }
|
6
8
|
get sizes() { return this.viewManager.sizes; }
|
@@ -14,6 +16,10 @@ export class CanvasScrollManager {
|
|
14
16
|
clearTimeout(this.updateScrollTimeoutId);
|
15
17
|
clearTimeout(this.waitForDblClickTimeoutId);
|
16
18
|
}
|
19
|
+
modelChanged(change) {
|
20
|
+
if (change.type == ModelChangeType.ZoomLevelChanged)
|
21
|
+
this.updateScrollVisibility();
|
22
|
+
}
|
17
23
|
get scrollTop() { return this.canvas.scrollTop; }
|
18
24
|
set scrollTop(val) { this.canvas.scrollTop = val; }
|
19
25
|
setScrollEnabled(enabled) {
|
@@ -32,46 +38,48 @@ export class CanvasScrollManager {
|
|
32
38
|
scrollToX(canvasState) {
|
33
39
|
const position = canvasState.lp;
|
34
40
|
const relativePosition = canvasState.relativePosition;
|
35
|
-
|
36
|
-
|
41
|
+
const zoomLevel = this.viewManager.zoomLevel;
|
42
|
+
const page = this.viewManager.layout.pages[position.pageIndex];
|
43
|
+
let y = MixedSize.fromLayout(this.sizes.getPageOffsetY(page)).useScale(zoomLevel);
|
44
|
+
let height = new MixedSize().useScale(zoomLevel);
|
37
45
|
if (position.detailsLevel >= DocumentLayoutDetailsLevel.PageArea) {
|
38
|
-
y
|
46
|
+
y.addLayoutSize(position.pageArea.y);
|
39
47
|
if (position.detailsLevel >= DocumentLayoutDetailsLevel.Column) {
|
40
|
-
y
|
48
|
+
y.addLayoutSize(position.column.y);
|
41
49
|
if (position.detailsLevel >= DocumentLayoutDetailsLevel.Row) {
|
42
|
-
y
|
50
|
+
y.addLayoutSize(position.row.y);
|
43
51
|
if (relativePosition === RelativePosition.Bottom)
|
44
|
-
y
|
52
|
+
y.addLayoutSize(position.row.height);
|
45
53
|
else if (relativePosition === RelativePosition.Inside)
|
46
|
-
height
|
54
|
+
height.clear().addLayoutSize(position.row.height);
|
47
55
|
}
|
48
56
|
else if (relativePosition === RelativePosition.Bottom)
|
49
|
-
y
|
57
|
+
y.addLayoutSize(position.column.height);
|
50
58
|
else if (relativePosition === RelativePosition.Inside)
|
51
|
-
height
|
59
|
+
height.clear().addLayoutSize(position.column.height);
|
52
60
|
}
|
53
61
|
else if (relativePosition === RelativePosition.Bottom)
|
54
|
-
y
|
62
|
+
y.addLayoutSize(position.pageArea.height);
|
55
63
|
else if (relativePosition === RelativePosition.Inside)
|
56
|
-
height
|
64
|
+
height.clear().addLayoutSize(position.pageArea.height);
|
57
65
|
}
|
58
66
|
else if (relativePosition === RelativePosition.Bottom)
|
59
|
-
y
|
67
|
+
y.addLayoutSize(position.page.height);
|
60
68
|
else if (relativePosition === RelativePosition.Inside)
|
61
|
-
height
|
69
|
+
height.clear().addLayoutSize(position.page.height);
|
62
70
|
if (relativePosition === RelativePosition.Bottom)
|
63
|
-
y
|
64
|
-
y
|
71
|
+
y.subtractUISize(this.sizes.getVisibleAreaHeight(false));
|
72
|
+
y.addUISize(canvasState.getVerticalOffset(this.sizes));
|
65
73
|
if (relativePosition === RelativePosition.Inside) {
|
66
74
|
let scrollTop = this.canvas.scrollTop;
|
67
75
|
const scrollVisibleAreaHeight = this.sizes.getVisibleAreaHeight(false);
|
68
|
-
if (y < scrollTop)
|
69
|
-
this.canvas.scrollTop = y;
|
70
|
-
else if (y + height > scrollVisibleAreaHeight + scrollTop)
|
71
|
-
this.canvas.scrollTop = y + height - scrollVisibleAreaHeight;
|
76
|
+
if (y.UISize < scrollTop)
|
77
|
+
this.canvas.scrollTop = y.UISize;
|
78
|
+
else if (y.UISize + height.UISize > scrollVisibleAreaHeight + scrollTop)
|
79
|
+
this.canvas.scrollTop = y.UISize + height.UISize - scrollVisibleAreaHeight;
|
72
80
|
}
|
73
81
|
else
|
74
|
-
this.canvas.scrollTop = y;
|
82
|
+
this.canvas.scrollTop = y.UISize;
|
75
83
|
}
|
76
84
|
NotifyScrollPositionChanged(canvasState) {
|
77
85
|
if (this.updateScrollTimeoutId) {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { IControlHeightProvider } from './i-control-height-provider';
|
2
2
|
import { LayoutPage } from '../layout/main-structures/layout-page';
|
3
3
|
import { RenderPageVertivalInfo } from '../view-settings/views-settings';
|
4
|
+
import { IZoomLevelHolder } from '../interfaces/i-zoom-level-holder';
|
4
5
|
export declare class CanvasSizeInfo implements IControlHeightProvider {
|
5
6
|
topSpacing: number;
|
6
7
|
betweenPageSpacing: number;
|
@@ -8,12 +9,13 @@ export declare class CanvasSizeInfo implements IControlHeightProvider {
|
|
8
9
|
scrollYVisible: boolean;
|
9
10
|
private visibleAreaSize;
|
10
11
|
private scrollWidth;
|
12
|
+
private zoomLevelHolder;
|
11
13
|
pageVerticalInfo: RenderPageVertivalInfo;
|
12
|
-
constructor();
|
14
|
+
constructor(zoomLevelHolder: IZoomLevelHolder);
|
13
15
|
isInitialized(): boolean;
|
14
16
|
initialize(page: HTMLElement, canvas: HTMLDivElement): void;
|
15
|
-
findPageIndexByOffsetY(pages: LayoutPage[], offsetY: number): number;
|
16
17
|
getPageOffsetY(layoutPage: LayoutPage): number;
|
18
|
+
get zoomLevel(): number;
|
17
19
|
private setVisibleAreaSize;
|
18
20
|
getVisibleAreaWidth(includeScrollBars: boolean): number;
|
19
21
|
getVisibleAreaHeight(includeScrollBars: boolean): number;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { RenderPageVertivalInfo } from '../view-settings/views-settings';
|
2
2
|
import { Size } from '@devexpress/utils/lib/geometry/size';
|
3
|
-
import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
4
3
|
import { DomUtils } from '@devexpress/utils/lib/utils/dom';
|
5
4
|
import { SizeUtils } from '../utils/size-utils';
|
6
5
|
export class CanvasSizeInfo {
|
7
|
-
constructor() {
|
6
|
+
constructor(zoomLevelHolder) {
|
8
7
|
this.topSpacing = -1;
|
9
8
|
this.betweenPageSpacing = 1;
|
10
9
|
this.visibleAreaSize = new Size(-1, -1);
|
11
10
|
this.scrollWidth = -1;
|
12
11
|
this.pageVerticalInfo = new RenderPageVertivalInfo();
|
12
|
+
this.zoomLevelHolder = zoomLevelHolder;
|
13
13
|
this.scrollWidth = DomUtils.getVerticalScrollBarWidth();
|
14
14
|
}
|
15
15
|
isInitialized() {
|
@@ -21,12 +21,10 @@ export class CanvasSizeInfo {
|
|
21
21
|
this.betweenPageSpacing = this.pageVerticalInfo.betweenPageSpacing;
|
22
22
|
this.setVisibleAreaSize(SizeUtils.getClientWidth(canvas), SizeUtils.getClientHeight(canvas));
|
23
23
|
}
|
24
|
-
findPageIndexByOffsetY(pages, offsetY) {
|
25
|
-
return Math.max(0, SearchUtils.normedInterpolationIndexOf(pages, (p) => this.getPageOffsetY(p), offsetY));
|
26
|
-
}
|
27
24
|
getPageOffsetY(layoutPage) {
|
28
25
|
return layoutPage.y + (this.topSpacing + layoutPage.index * this.betweenPageSpacing);
|
29
26
|
}
|
27
|
+
get zoomLevel() { return this.zoomLevelHolder.zoomLevel; }
|
30
28
|
setVisibleAreaSize(width, height) {
|
31
29
|
this.visibleAreaSize.width = width;
|
32
30
|
this.visibleAreaSize.height = height;
|
@@ -74,9 +74,9 @@ export class PrintLayoutViewCanvasListener extends CanvasListener {
|
|
74
74
|
Log.paramsHolder.visualizerManager.show(DebugVisualizerType.LayoutBounds, this.layout, p.index); }));
|
75
75
|
}
|
76
76
|
updateVisiblePages() {
|
77
|
-
|
78
|
-
this.viewManager.scroll.updatePageIndexesInfo(pages);
|
77
|
+
this.viewManager.scroll.updatePageIndexesInfo(this.layout);
|
79
78
|
const renderInterval = this.viewManager.scroll.renderPageIndexInterval();
|
79
|
+
const pages = this.layout.pages;
|
80
80
|
for (let pageIndex of this.handledPageIndexes)
|
81
81
|
if (!renderInterval.contains(pageIndex)) {
|
82
82
|
const page = pages[pageIndex];
|
@@ -25,8 +25,10 @@ import { Size } from '@devexpress/utils/lib/geometry/size';
|
|
25
25
|
import { CanvasManager } from '../../canvas-manager';
|
26
26
|
import { ViewManager } from '../view-manager';
|
27
27
|
import { IRichEditControl } from '../../../interfaces/i-rich-edit-core';
|
28
|
+
import { IModelChangesListener } from '../../../interfaces/model-changes-listener';
|
29
|
+
import { ModelChange } from '../../../model/changes/change';
|
28
30
|
export type GetSomeCanvasElementContainer = (node: Node) => Node;
|
29
|
-
export declare class SimpleViewCanvasSizeManager {
|
31
|
+
export declare class SimpleViewCanvasSizeManager implements IModelChangesListener {
|
30
32
|
protected canvasManager: CanvasManager;
|
31
33
|
protected size: Size;
|
32
34
|
private control;
|
@@ -36,6 +38,7 @@ export declare class SimpleViewCanvasSizeManager {
|
|
36
38
|
private resizeFrameId;
|
37
39
|
constructor(canvasManager: CanvasManager, control: IRichEditControl);
|
38
40
|
dispose(): void;
|
41
|
+
modelChanged(change: ModelChange): void;
|
39
42
|
changeSize(force: boolean): void;
|
40
43
|
setViewMode(val: boolean): void;
|
41
44
|
private changeSizeCore;
|
@@ -28,6 +28,7 @@ import { CanvasUtils } from '../../utils';
|
|
28
28
|
import { ScrollState } from '../../../scroll/model-states';
|
29
29
|
import { isDefined } from '@devexpress/utils/lib/utils/common';
|
30
30
|
import { StringUtils } from '@devexpress/utils/lib/utils/string';
|
31
|
+
import { ModelChangeType } from '../../../model/changes/enums';
|
31
32
|
export class SimpleViewCanvasSizeManager {
|
32
33
|
constructor(canvasManager, control) {
|
33
34
|
this.size = new Size(0, 0);
|
@@ -52,6 +53,10 @@ export class SimpleViewCanvasSizeManager {
|
|
52
53
|
this.resizeFrameId = null;
|
53
54
|
this.resizeObserver.disconnect();
|
54
55
|
}
|
56
|
+
modelChanged(change) {
|
57
|
+
if (change.type == ModelChangeType.ZoomLevelChanged && this.control.innerClientProperties.viewsSettings.isSimpleView)
|
58
|
+
this.changeSize(true);
|
59
|
+
}
|
55
60
|
changeSize(force) {
|
56
61
|
const curr = new Size(this.canvasManager.getCanvasWidth(), this.canvasManager.controlHeightProvider.getVisibleAreaHeight(false));
|
57
62
|
if (force || !curr.equals(this.size)) {
|
@@ -77,18 +82,16 @@ export class SimpleViewCanvasSizeManager {
|
|
77
82
|
this.sizeUpdated = true;
|
78
83
|
}
|
79
84
|
changeSizeCore() {
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
this.control.selection.
|
87
|
-
.setModelPosition(this.control.selection.lastSelectedInterval.start).useStdRelativePosition().useStdOffset());
|
88
|
-
}
|
89
|
-
this.control.owner.adjustControl();
|
90
|
-
this.control.horizontalRulerControl.update();
|
85
|
+
ListUtils.forEach(this.control.viewManager.cache, (_val) => this.control.viewManager.renderer.removePage(1), 1);
|
86
|
+
this.control.viewManager.ensureFirstPageIsRendered();
|
87
|
+
this.control.innerClientProperties.viewsSettings.widthOfPage = this.canvasManager.getCanvasWidth();
|
88
|
+
if (this.control.layoutFormatterManager) {
|
89
|
+
this.control.layoutFormatterManager.invalidator.onChangedAllLayout();
|
90
|
+
this.control.selection.scrollManager.setScroll(new ScrollState().byModelPosition(this.control.selection)
|
91
|
+
.setModelPosition(this.control.selection.lastSelectedInterval.start).useStdRelativePosition().useStdOffset());
|
91
92
|
}
|
93
|
+
this.control.owner.adjustControl();
|
94
|
+
this.control.horizontalRulerControl.update();
|
92
95
|
}
|
93
96
|
}
|
94
97
|
export class DocumentRenderer {
|
@@ -272,7 +275,7 @@ export class DocumentRenderer {
|
|
272
275
|
}
|
273
276
|
}
|
274
277
|
updatePageSize(page, pageElement) {
|
275
|
-
if (pageElement.offsetHeight != page.height || pageElement.offsetWidth != page.width)
|
278
|
+
if (pageElement.offsetHeight != Math.round(page.height) || pageElement.offsetWidth != Math.round(page.width))
|
276
279
|
DomUtils.setStyleSize(pageElement.style, page);
|
277
280
|
}
|
278
281
|
updatePageClasses(pageElement) {
|
@@ -24,7 +24,10 @@ import { MisspelledSelectionRenderer } from './selection-renderers/misspelled-se
|
|
24
24
|
import { RangePermissionRenderer } from './selection-renderers/range-permission-renderer';
|
25
25
|
import { SearchSelectionRenderer } from './selection-renderers/search-selection-renderer';
|
26
26
|
import { SelectionRenderer } from './selection-renderers/selection-renderer';
|
27
|
-
|
27
|
+
import { IZoomLevelHolder } from '../../interfaces/i-zoom-level-holder';
|
28
|
+
import { IModelChangesListener } from '../../interfaces/model-changes-listener';
|
29
|
+
import { ModelChange } from '../../model/changes/change';
|
30
|
+
export declare class ViewManager implements ILayoutChangesListener, IZoomLevelHolder, IModelChangesListener {
|
28
31
|
private renderers;
|
29
32
|
get renderer(): DocumentRenderer;
|
30
33
|
get printLayoutRenderer(): DocumentRenderer;
|
@@ -56,6 +59,7 @@ export declare class ViewManager implements ILayoutChangesListener {
|
|
56
59
|
readonly control: IRichEditControl;
|
57
60
|
constructor(control: IRichEditControl, canvas: HTMLDivElement, eventManager: IEventManager, stringResources: StringResources, horizontalRuler: IRulerControl, inputController: InputController, innerClientProperties: InnerClientProperties, readOnlyPropertyHolder: IReadOnlyPropertyHolder, layoutFormatterManagerHolder: ILayoutFormatterManagerHolder, internalApi: IInternalApi, fieldOptions: FieldsSettings);
|
58
61
|
dispose(): void;
|
62
|
+
modelChanged(change: ModelChange): void;
|
59
63
|
adjust(force: boolean): void;
|
60
64
|
NotifyPagesReady(pageChanges: PageChange[]): void;
|
61
65
|
NotifyFullyFormatted(_pageCount: number): void;
|
@@ -26,13 +26,16 @@ import { SearchSelectionRenderer } from './selection-renderers/search-selection-
|
|
26
26
|
import { SelectionRenderer } from './selection-renderers/selection-renderer';
|
27
27
|
import { ControlOptions, DocumentCapability } from '../../model/options/control';
|
28
28
|
import { RichEditClientCommand } from '../../commands/client-command';
|
29
|
+
import { ZoomLevelChange } from '../../model/changes/model/zoom-level';
|
30
|
+
import { ModelChangeType } from '../../model/changes/enums';
|
31
|
+
import { MixedSize } from '../../../common/utils/mixed-size';
|
29
32
|
export class ViewManager {
|
30
33
|
get renderer() { return this.renderers[this.innerClientProperties.viewsSettings.viewType]; }
|
31
34
|
get printLayoutRenderer() { return this.renderers[ViewType.PrintLayout]; }
|
32
35
|
get canvasListener() { return this.canvasListeners[this.innerClientProperties.viewsSettings.viewType]; }
|
33
36
|
constructor(control, canvas, eventManager, stringResources, horizontalRuler, inputController, innerClientProperties, readOnlyPropertyHolder, layoutFormatterManagerHolder, internalApi, fieldOptions) {
|
34
37
|
this.cache = [];
|
35
|
-
this.sizes = new CanvasSizeInfo();
|
38
|
+
this.sizes = new CanvasSizeInfo(this);
|
36
39
|
this.control = control;
|
37
40
|
this.readOnlyPropertyHolder = readOnlyPropertyHolder;
|
38
41
|
this.layoutFormatterManagerHolder = layoutFormatterManagerHolder;
|
@@ -67,6 +70,13 @@ export class ViewManager {
|
|
67
70
|
this.selection.dispose();
|
68
71
|
this.pagesContainer = null;
|
69
72
|
}
|
73
|
+
modelChanged(change) {
|
74
|
+
if (change.type == ModelChangeType.ZoomLevelChanged) {
|
75
|
+
this.canvas.scrollTop = this.canvas.scrollTop / change.prevZoomLevel * change.zoomLevel;
|
76
|
+
this.pagesContainer.style.zoom = change.zoomLevel.toString();
|
77
|
+
this.sizes.updateSize(this.canvas);
|
78
|
+
}
|
79
|
+
}
|
70
80
|
adjust(force) {
|
71
81
|
if ((force || !this.sizes.isInitialized()) && this.cache.length > 0) {
|
72
82
|
const firstRenderedPageIndex = Math.min(this.cache.length, Math.max(0, ListUtils.indexBy(this.layout.pages, (page) => page.flags.get(LayoutPageFlags.ContentRendered))));
|
@@ -104,7 +114,9 @@ export class ViewManager {
|
|
104
114
|
const pageInfo = layoutSelection.selectionInfo.pageInfos[pageIndex];
|
105
115
|
const item = pageInfo.oldItems[0];
|
106
116
|
const layoutPage = this.layout.pages[pageIndex];
|
107
|
-
|
117
|
+
const x = MixedSize.fromLayout(layoutPage.x + this.cache[pageIndex].page.offsetLeft + item.x).useScale(this.zoomLevel);
|
118
|
+
const y = MixedSize.fromLayout(this.sizes.getPageOffsetY(layoutPage) + item.y).useScale(this.zoomLevel);
|
119
|
+
this.inputController.setPosition(x.UISize, y.UISize);
|
108
120
|
}
|
109
121
|
}
|
110
122
|
NotifySearchSelectionLayoutChanged() {
|
@@ -169,12 +181,9 @@ export class ViewManager {
|
|
169
181
|
}
|
170
182
|
get zoomLevel() { return this.innerClientProperties.viewsSettings.zoomLevel; }
|
171
183
|
set zoomLevel(value) {
|
172
|
-
|
184
|
+
const prevZoomLevel = this.zoomLevel;
|
173
185
|
this.innerClientProperties.viewsSettings.zoomLevel = value;
|
174
|
-
|
175
|
-
this.canvasManager.simpleViewCanvasSizeManager.changeSize(true);
|
176
|
-
}
|
177
|
-
this.control.horizontalRulerControl.update();
|
186
|
+
this.control.modelManager.modelManipulator.notifyModelChanged(new ZoomLevelChange(this.zoomLevel, prevZoomLevel));
|
178
187
|
}
|
179
188
|
get allowZoom() { return ControlOptions.isEnabled(this.control.modelManager.richOptions.control.allowZoom); }
|
180
189
|
set allowZoom(value) {
|
@@ -422,5 +422,4 @@ export var RichEditClientCommand;
|
|
422
422
|
RichEditClientCommand[RichEditClientCommand["GetHtml"] = 458] = "GetHtml";
|
423
423
|
RichEditClientCommand[RichEditClientCommand["CreateEmptyIfField"] = 459] = "CreateEmptyIfField";
|
424
424
|
RichEditClientCommand[RichEditClientCommand["ChangeZoomLevel"] = 460] = "ChangeZoomLevel";
|
425
|
-
RichEditClientCommand[RichEditClientCommand["ToggleAllowZoom"] = 461] = "ToggleAllowZoom";
|
426
425
|
})(RichEditClientCommand || (RichEditClientCommand = {}));
|
@@ -67,7 +67,6 @@ import { GoToNextHeaderFooterCommand, GoToPreviousHeaderFooterCommand } from './
|
|
67
67
|
import { InsertFooterCommand, InsertHeaderCommand } from './header-footer/insert-header-footer-commands';
|
68
68
|
import { LinkHeaderFooterToPreviousCommand } from './header-footer/link-header-footer-commands';
|
69
69
|
import { ApplyStyleCommand } from './layout/apply-style-command';
|
70
|
-
import { ToggleAllowZoomCommand } from './layout/toggle-allow-zoom-command';
|
71
70
|
import { ChangeZoomLevelCommand } from './layout/change-zoom-level-command';
|
72
71
|
import { ClearFormattingCommand } from './layout/clear-formatting-command';
|
73
72
|
import { ChangeViewTypeCommand, SwitchToPrintLayoutViewCommand, SwitchToSimpleViewCommand } from './layout/switch-view-command';
|
@@ -558,7 +557,6 @@ export class CommandManager {
|
|
558
557
|
this.createCommand(control, RichEditClientCommand.SwitchToSimpleView, SwitchToSimpleViewCommand);
|
559
558
|
this.createCommand(control, RichEditClientCommand.SwitchToPrintLayoutView, SwitchToPrintLayoutViewCommand);
|
560
559
|
this.createCommand(control, RichEditClientCommand.ChangeZoomLevel, ChangeZoomLevelCommand);
|
561
|
-
this.createCommand(control, RichEditClientCommand.ToggleAllowZoom, ToggleAllowZoomCommand);
|
562
560
|
this.createCommand(control, RichEditClientCommand.ShowErrorLoadPictureMessage, ShowLoadPictureErrorDialogCommand);
|
563
561
|
this.assingCommand(RichEditClientCommand.PrintDocumentOnClient, new PrintDocumentOnClient(control, printNonce));
|
564
562
|
}
|
@@ -13,6 +13,8 @@ export declare class PrintDocumentOnClient extends CommandBase<SimpleCommandStat
|
|
13
13
|
executeCore(_state: SimpleCommandState, options: CommandSimpleOptions<PrintMode | PrintingSettings | undefined>): boolean;
|
14
14
|
private printCore;
|
15
15
|
private generatePrintDocument;
|
16
|
+
private getGoogleFonts;
|
17
|
+
private createGoogleFontStyleLink;
|
16
18
|
private generatePrintContent;
|
17
19
|
private createZIndexStyles;
|
18
20
|
}
|
@@ -80,8 +80,18 @@ export class PrintDocumentOnClient extends CommandBase {
|
|
80
80
|
return true;
|
81
81
|
}
|
82
82
|
printCore(htmlPrinting, printWindow, closePrintDialogWithHtmlPreview, needSwitchViewType, needToggleHiddenSymbols) {
|
83
|
-
if (htmlPrinting)
|
84
|
-
this.generatePrintDocument(printWindow
|
83
|
+
if (htmlPrinting) {
|
84
|
+
this.generatePrintDocument(printWindow.document);
|
85
|
+
printWindow.focus();
|
86
|
+
const interval = setInterval(() => {
|
87
|
+
if (printWindow.document.readyState == 'complete') {
|
88
|
+
printWindow.print();
|
89
|
+
if (closePrintDialogWithHtmlPreview && !Browser.AndroidMobilePlatform)
|
90
|
+
printWindow.close();
|
91
|
+
clearInterval(interval);
|
92
|
+
}
|
93
|
+
}, 100);
|
94
|
+
}
|
85
95
|
else {
|
86
96
|
pdfExport(this.control, (blob, _stream) => {
|
87
97
|
if (window.navigator.msSaveOrOpenBlob && !Browser.Edge)
|
@@ -96,12 +106,27 @@ export class PrintDocumentOnClient extends CommandBase {
|
|
96
106
|
this.control.commandManager.getCommand(RichEditClientCommand.ToggleShowWhitespace).execute(this.control.commandManager.isPublicApiCall);
|
97
107
|
this.control.commandManager.isPrintingProcessing = false;
|
98
108
|
}
|
99
|
-
generatePrintDocument(
|
109
|
+
generatePrintDocument(document) {
|
100
110
|
const height = this.control.layout.pages[0].height;
|
101
111
|
const width = this.control.layout.pages[0].width;
|
102
|
-
let
|
103
|
-
|
112
|
+
let fontLink = "";
|
113
|
+
let divsToLoadFonts = "";
|
114
|
+
const googleFonts = this.getGoogleFonts();
|
115
|
+
if (googleFonts.length > 0) {
|
116
|
+
fontLink = this.createGoogleFontStyleLink(googleFonts);
|
117
|
+
divsToLoadFonts = googleFonts.reduce((prev, curr) => {
|
118
|
+
const fontStyles = [`font-family:${curr}`, 'font-weight:bold', 'font-style:italic'];
|
119
|
+
const result = [];
|
120
|
+
for (let i = 1; i <= fontStyles.length; i++)
|
121
|
+
result.push(`<div style="font-size:1pt;position:absolute;top:-1000px;${fontStyles.slice(0, i).join(';')}">${curr}</div>`);
|
122
|
+
return prev ? [prev, ...result].join('\n') : result.join('\n');
|
123
|
+
}, null);
|
124
|
+
}
|
125
|
+
document.documentElement.innerHTML =
|
126
|
+
`<!DOCTYPE html>
|
127
|
+
<html moznomarginboxes mozdisallowselectionprint>
|
104
128
|
<head>
|
129
|
+
${fontLink}
|
105
130
|
<style ${this._nonce ? `nonce="${this._nonce}"` : ''}>
|
106
131
|
html, body {
|
107
132
|
margin: 0;
|
@@ -120,22 +145,25 @@ export class PrintDocumentOnClient extends CommandBase {
|
|
120
145
|
</style>
|
121
146
|
</head>
|
122
147
|
<body>
|
148
|
+
${divsToLoadFonts}
|
123
149
|
</body>
|
124
|
-
|
125
|
-
printWindow.document.write(printWindowContent);
|
126
|
-
printWindow.document.close();
|
150
|
+
</html>`;
|
127
151
|
this.generatePrintContent().forEach((child) => {
|
128
|
-
|
152
|
+
document.body.appendChild(child);
|
129
153
|
});
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
154
|
+
}
|
155
|
+
getGoogleFonts() {
|
156
|
+
return this.control.modelManager.richOptions.fonts.fonts.reduce((res, f) => {
|
157
|
+
if (f.useGoogleFonts)
|
158
|
+
res.push(f.fontFamily);
|
159
|
+
return res;
|
160
|
+
}, []);
|
161
|
+
}
|
162
|
+
createGoogleFontStyleLink(fontFamilies) {
|
163
|
+
const url = new URL('https://fonts.googleapis.com/css');
|
164
|
+
url.searchParams.append('family', fontFamilies.join('|'));
|
165
|
+
url.searchParams.append('display', 'auto');
|
166
|
+
return `<link href="${url.toString()}" rel="stylesheet" />`;
|
139
167
|
}
|
140
168
|
generatePrintContent() {
|
141
169
|
const layout = this.control.layout;
|
@@ -6,7 +6,7 @@ import { CommandBase, CommandSimpleOptions } from '../command-base';
|
|
6
6
|
import { ApplyStyleCommandState } from '../command-states';
|
7
7
|
export interface IApplyStyleCommandParams {
|
8
8
|
styleName: string;
|
9
|
-
|
9
|
+
keepCustomFormatting?: boolean;
|
10
10
|
}
|
11
11
|
export declare class ApplyStyleCommand extends CommandBase<ApplyStyleCommandState> {
|
12
12
|
getState(): ApplyStyleCommandState;
|
@@ -14,7 +14,7 @@ export declare class ApplyStyleCommand extends CommandBase<ApplyStyleCommandStat
|
|
14
14
|
DEPRECATEDConvertOptionsParameter(parameter: string | IApplyStyleCommandParams): IApplyStyleCommandParams;
|
15
15
|
executeCore(state: ApplyStyleCommandState, options: CommandSimpleOptions<IApplyStyleCommandParams>): boolean;
|
16
16
|
applyCharacterStyle(subDocumentInterval: SubDocumentInterval, style: CharacterStyle, isPresetStyle: boolean): void;
|
17
|
-
applyParagraphStyle(subDocumentInterval: SubDocumentInterval, style: ParagraphStyle, isPresetStyle: boolean,
|
17
|
+
applyParagraphStyle(subDocumentInterval: SubDocumentInterval, style: ParagraphStyle, isPresetStyle: boolean, keepCustomFormatting?: boolean): void;
|
18
18
|
applyParagraphLinkedStyle(subDocumentInterval: SubDocumentInterval, style: ParagraphStyle, isPresetStyle: boolean): void;
|
19
19
|
private addLinkedCharacterStyle;
|
20
20
|
calculateAffectedParagraphCount(subDocumentInterval: SubDocumentInterval): number;
|
@@ -70,7 +70,7 @@ export class ApplyStyleCommand extends CommandBase {
|
|
70
70
|
paragraphStyle = StylesManager.getPresetParagraphStyleByName(styleName).clone();
|
71
71
|
isPresetStyle = true;
|
72
72
|
}
|
73
|
-
this.applyParagraphStyle(subDocumentInterval, paragraphStyle, isPresetStyle, parameter.
|
73
|
+
this.applyParagraphStyle(subDocumentInterval, paragraphStyle, isPresetStyle, parameter.keepCustomFormatting);
|
74
74
|
}
|
75
75
|
else if (!StylesManager.isParagraphStyle(parameter.styleName) && state.characterStyleChangeEnabled) {
|
76
76
|
const styleName = StylesManager.getStyleNameWithoutPrefix(parameter.styleName);
|
@@ -105,7 +105,7 @@ export class ApplyStyleCommand extends CommandBase {
|
|
105
105
|
this.modelManipulator.style.applyCharacterStyle(subDocumentInterval, characterStyle, false);
|
106
106
|
}
|
107
107
|
}
|
108
|
-
applyParagraphStyle(subDocumentInterval, style, isPresetStyle,
|
108
|
+
applyParagraphStyle(subDocumentInterval, style, isPresetStyle, keepCustomFormatting = false) {
|
109
109
|
const count = this.calculateAffectedParagraphCount(subDocumentInterval);
|
110
110
|
if (count > 0 && ControlOptions.isEnabled(this.control.modelManager.richOptions.control.paragraphStyle)) {
|
111
111
|
const { interval, subDocument } = subDocumentInterval;
|
@@ -118,8 +118,7 @@ export class ApplyStyleCommand extends CommandBase {
|
|
118
118
|
style = isPresetStyle ? modelManipulator.model.stylesManager.addParagraphStyle(style) : style;
|
119
119
|
this.history.addAndRedo(new ApplyParagraphStyleHistoryItem(modelManipulator, paragraphSubDocumentInterval, style));
|
120
120
|
this.history.addAndRedo(new ParagraphUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0));
|
121
|
-
|
122
|
-
this.history.addAndRedo(new FontUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0));
|
121
|
+
this.history.addAndRedo(new FontUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0, keepCustomFormatting));
|
123
122
|
this.history.addAndRedo(new AddParagraphToListHistoryItem(modelManipulator, subDocument, paragraphIndex, NumberingList.NumberingListNotSettedIndex, -1));
|
124
123
|
}
|
125
124
|
}
|
@@ -22,7 +22,7 @@ export class SetParagraphLevelCommandBase extends CommandBase {
|
|
22
22
|
if (!paragraphStyle)
|
23
23
|
paragraphStyle = StylesManager.getPresetParagraphStyleByName(styleName);
|
24
24
|
if (paragraphStyle) {
|
25
|
-
const commandOptions = new CommandSimpleOptions(this.control, { styleName: StylesManager.paragraphPrefix + styleName,
|
25
|
+
const commandOptions = new CommandSimpleOptions(this.control, { styleName: StylesManager.paragraphPrefix + styleName, keepCustomFormatting: true });
|
26
26
|
this.commandManager.getCommand(RichEditClientCommand.ChangeStyle).execute(this.commandManager.isPublicApiCall, commandOptions);
|
27
27
|
}
|
28
28
|
else {
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { IPictureRenderer } from "../canvas/picture-renderer";
|
2
2
|
import { DocumentFormat } from "../document-format";
|
3
|
+
import { Grid } from "../layout-formatter/table/grid-engine/grid";
|
3
4
|
import { IModelManager } from "../model-manager";
|
5
|
+
import { Table } from "../model/tables/main-structures/table";
|
4
6
|
import { IRichEditUnitConverter } from "../utils/unit-converter";
|
5
7
|
export interface IDocumentExporter {
|
6
8
|
exportToBlob(callback: (blob: Blob) => void): any;
|
@@ -14,5 +16,6 @@ export interface IExportModelOptions {
|
|
14
16
|
sessionGuid: string;
|
15
17
|
clientGuid: string;
|
16
18
|
lastMaxNumPages?: number;
|
19
|
+
grids?: Map<Table, Grid>;
|
17
20
|
pageIndex?: number;
|
18
21
|
}
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import { IDocumentExporter } from '../../i-document-exporter';
|
1
|
+
import { IDocumentExporter, IExportModelOptions } from '../../i-document-exporter';
|
2
2
|
import { ColorModelInfo } from '../../../model/color/color-model-info';
|
3
3
|
import { DocumentModel } from '../../../model/document-model';
|
4
|
-
import { ModelManipulator } from '../../../model/manipulators/model-manipulator';
|
5
4
|
import { RtfContentExporter } from './exporters/rtf-content-exporter';
|
6
5
|
import { RtfExportHelper } from './helpers/rtf-export-helper';
|
7
6
|
import { RtfBuilder } from './rtf-builder';
|
@@ -13,7 +12,7 @@ export declare class RtfExporter implements IDocumentExporter {
|
|
13
12
|
contentExporter: RtfContentExporter;
|
14
13
|
private modelManipulator;
|
15
14
|
get documentModel(): DocumentModel;
|
16
|
-
constructor(
|
15
|
+
constructor(exportModelOptions: IExportModelOptions, options: RtfDocumentExporterOptions);
|
17
16
|
exportToBlob(callback: (blob: Blob) => void): void;
|
18
17
|
exportToBase64(callback: (base64: string) => void): void;
|
19
18
|
exportAsString(): string;
|
@@ -11,11 +11,11 @@ import { RtfContentExporter } from './exporters/rtf-content-exporter';
|
|
11
11
|
import { RtfExportHelper } from './helpers/rtf-export-helper';
|
12
12
|
export class RtfExporter {
|
13
13
|
get documentModel() { return this.modelManipulator.model; }
|
14
|
-
constructor(
|
15
|
-
this.modelManipulator = modelManipulator;
|
14
|
+
constructor(exportModelOptions, options) {
|
15
|
+
this.modelManipulator = exportModelOptions.modelManager.modelManipulator;
|
16
16
|
this.options = options;
|
17
17
|
this.rtfExportHelper = new RtfExportHelper();
|
18
|
-
this.contentExporter = new RtfContentExporter(
|
18
|
+
this.contentExporter = new RtfContentExporter(exportModelOptions, options, this.rtfExportHelper);
|
19
19
|
this.rtfBuilder = this.contentExporter.createRtfBuilder();
|
20
20
|
}
|
21
21
|
exportToBlob(callback) {
|
@@ -8,6 +8,7 @@ import { Section } from '../../../../model/section/section';
|
|
8
8
|
import { SubDocument } from '../../../../model/sub-document';
|
9
9
|
import { FooterSubDocumentInfo, HeaderSubDocumentInfo } from '../../../../model/sub-document-infos';
|
10
10
|
import { ConditionalTableStyleFormatting } from '../../../../model/tables/secondary-structures/table-base-structures';
|
11
|
+
import { IExportModelOptions } from '../../../../formats/i-document-exporter';
|
11
12
|
import { RtfExportHelper } from '../helpers/rtf-export-helper';
|
12
13
|
import { PieceTableNumberingListCountersManager } from '../piece-table-numbering-list-counters-manager';
|
13
14
|
import { RtfBuilder } from '../rtf-builder';
|
@@ -17,7 +18,7 @@ import { RtfParagraphPropertiesExporter } from './rtf-paragraph-properties-expor
|
|
17
18
|
import { RtfSectionPropertiesExporter } from './rtf-section-properties-exporter';
|
18
19
|
export type RunHandler = (run: RunBase, runText: string, absolutePosition: number) => void;
|
19
20
|
export declare class RtfContentExporter {
|
20
|
-
|
21
|
+
exportModelOptions: IExportModelOptions;
|
21
22
|
subDocument: SubDocument;
|
22
23
|
currentSection: Section;
|
23
24
|
static readonly verticalAlignmentTypes: Record<number, string>;
|
@@ -44,9 +45,10 @@ export declare class RtfContentExporter {
|
|
44
45
|
private bookmarksIterator;
|
45
46
|
private permissionsIterator;
|
46
47
|
tableIterator: TableIterator;
|
48
|
+
get documentModel(): DocumentModel;
|
47
49
|
private startSectionParagraphIndex;
|
48
50
|
private shouldFourceUpdateIterators;
|
49
|
-
constructor(
|
51
|
+
constructor(exportModelOptions: IExportModelOptions, options: RtfDocumentExporterOptions, rtfExportHelper: RtfExportHelper);
|
50
52
|
createRtfBuilder(): RtfBuilder;
|
51
53
|
export(): void;
|
52
54
|
shouldSplitRuns(): boolean;
|