@hailin-zheng/editor-core 1.0.35 → 1.0.36
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/index-cjs.js +124 -15
- package/index.js +124 -15
- package/med_editor/framework/element-define.d.ts +4 -1
- package/med_editor/framework/element-measure.d.ts +4 -4
- package/med_editor/framework/impl/document/doc-impl.d.ts +8 -0
- package/med_editor/framework/impl/paragraph/p-line-impl.d.ts +24 -0
- package/med_editor/texteditor.d.ts +2 -1
- package/package.json +1 -1
@@ -216,6 +216,7 @@ export declare class PageOptions {
|
|
216
216
|
set height(value: number);
|
217
217
|
}
|
218
218
|
export declare type OrientType = 'landscape' | 'portrait';
|
219
|
+
export declare type PageLayoutMode = 'singlePage' | 'multiPage' | 'fit-page';
|
219
220
|
export declare class ViewOptions {
|
220
221
|
copyRightInfo: string;
|
221
222
|
watermark?: string;
|
@@ -232,6 +233,8 @@ export declare class ViewOptions {
|
|
232
233
|
viewBackcolor: string;
|
233
234
|
paraSymbolColor: string;
|
234
235
|
dataGroupColor: string;
|
236
|
+
trackInsColor: string;
|
237
|
+
trackDelColor: string;
|
235
238
|
showLineRect: boolean;
|
236
239
|
showCharRect: boolean;
|
237
240
|
showParaMark: boolean;
|
@@ -259,7 +262,7 @@ export declare class ViewOptions {
|
|
259
262
|
};
|
260
263
|
pageNumFormat: string;
|
261
264
|
pageNumOffset: number;
|
262
|
-
pageLayoutMode:
|
265
|
+
pageLayoutMode: PageLayoutMode;
|
263
266
|
get contentWidth(): number;
|
264
267
|
/**
|
265
268
|
* 内容区域的高度
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Element, InlineGroupElement, ViewOptions } from "./element-define";
|
2
|
-
import { FillNullSpaceRenderObject } from "./impl
|
3
|
-
import { DocumentElement, DocumentRenderObject } from "./impl
|
4
|
-
import { ParagraphElement, ParagraphLineRectRenderObject, ParagraphRenderObject } from "./impl
|
5
|
-
import { TextGroupRenderObject } from "./impl
|
2
|
+
import { FillNullSpaceRenderObject } from "./impl";
|
3
|
+
import { DocumentElement, DocumentRenderObject } from "./impl";
|
4
|
+
import { ParagraphElement, ParagraphLineRectRenderObject, ParagraphRenderObject } from "./impl";
|
5
|
+
import { TextGroupRenderObject } from "./impl";
|
6
6
|
import { RenderContextType } from "./render-context";
|
7
7
|
import { InlineGroupRenderObject, RenderObject } from "./render-define";
|
8
8
|
interface ICutLineData {
|
@@ -33,6 +33,14 @@ export declare class DocumentRenderObject extends BlockContainerRenderObject {
|
|
33
33
|
headerLine: number;
|
34
34
|
footerLine: number;
|
35
35
|
render(e: IRenderData): void;
|
36
|
+
/**
|
37
|
+
* 绘制版权信息
|
38
|
+
*/
|
39
|
+
private drawCopyRight;
|
40
|
+
/**
|
41
|
+
* 绘制文档边距线
|
42
|
+
*/
|
43
|
+
private drawMarginLine;
|
36
44
|
/**
|
37
45
|
* 绘制水印
|
38
46
|
* @param ctx
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ElementFactory, LeafElement, readElementProps, SerializeProps, ViewOptions, Element } from "../../element-define";
|
2
|
+
import { RenderContextType } from "../../render-context";
|
3
|
+
import { IRenderData, LeafRenderObject, RenderObject } from "../../render-define";
|
4
|
+
/**
|
5
|
+
* 段落行
|
6
|
+
*/
|
7
|
+
export declare class ParaLineElement extends LeafElement<ParaLineProps> {
|
8
|
+
constructor();
|
9
|
+
clone(data: boolean): Element;
|
10
|
+
createRenderObject(options: ViewOptions, renderCtx: RenderContextType): RenderObject | null;
|
11
|
+
serialize(viewOptions: ViewOptions): SerializeProps | null;
|
12
|
+
}
|
13
|
+
export declare class ParaLineRenderObject extends LeafRenderObject {
|
14
|
+
clone(): RenderObject;
|
15
|
+
render(e: IRenderData): void;
|
16
|
+
}
|
17
|
+
export declare class ParaLineElementFactory extends ElementFactory<ParaLineProps> {
|
18
|
+
createElement(data: readElementProps<ParaLineProps>, renderCtx: RenderContextType): Element;
|
19
|
+
match(type: string): boolean;
|
20
|
+
}
|
21
|
+
export declare class ParaLineProps {
|
22
|
+
lineType: 'solid' | 'dash';
|
23
|
+
clone(dest?: ParaLineProps): ParaLineProps;
|
24
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ContentMenuItem } from './framework/element-event-define';
|
2
2
|
import { ElementReader } from './framework/element-reader';
|
3
3
|
import { SelectionState } from './framework/document-selection';
|
4
|
-
import { BranchElement, Element, ICancelTokenFn, LeafElement, MarginProps, OrientType, Position, Rect, TextAlign, ViewOptions } from './framework/element-define';
|
4
|
+
import { BranchElement, Element, ICancelTokenFn, LeafElement, MarginProps, OrientType, PageLayoutMode, Position, Rect, TextAlign, ViewOptions } from './framework/element-define';
|
5
5
|
import { DataElementInlineGroup, DataElementLeaf, DocumentElement } from './framework/impl';
|
6
6
|
import { ParagraphProps, TextProps } from './framework/element-props';
|
7
7
|
import { EditorContext } from './framework/document-context';
|
@@ -288,6 +288,7 @@ export declare class CanvasTextEditor {
|
|
288
288
|
showHistory(): void;
|
289
289
|
getControlById(index: number): Element<any> | null;
|
290
290
|
getControlId(ele: Element): number;
|
291
|
+
switchPageLayout(mode: PageLayoutMode): void;
|
291
292
|
}
|
292
293
|
export declare type EditorCurrentPos = {
|
293
294
|
pos: Position;
|