@hailin-zheng/editor-core 2.2.17 → 2.2.19
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 +175 -59
- package/index-cjs.js.map +1 -1
- package/index.js +174 -60
- package/index.js.map +1 -1
- package/med_editor/doc-editor.d.ts +8 -0
- package/med_editor/framework/document-change.d.ts +8 -0
- package/med_editor/framework/element-define.d.ts +7 -1
- package/med_editor/framework/impl/data-element/data-element-base-impl.d.ts +8 -1
- package/package.json +1 -1
@@ -510,6 +510,14 @@ export declare class DocEditor {
|
|
510
510
|
* @param attr
|
511
511
|
*/
|
512
512
|
removeEleAttribute(ele: Element, attr: string): void;
|
513
|
+
/**
|
514
|
+
* 在光标处插入内容
|
515
|
+
* @param data
|
516
|
+
*/
|
517
|
+
onInsertContent(data: {
|
518
|
+
text: string;
|
519
|
+
doc: string;
|
520
|
+
}): void;
|
513
521
|
}
|
514
522
|
export interface IReaderManager {
|
515
523
|
}
|
@@ -258,6 +258,14 @@ export declare class DocumentChange {
|
|
258
258
|
* @returns
|
259
259
|
*/
|
260
260
|
onPaste(evt: ClipboardEvent): void;
|
261
|
+
/**
|
262
|
+
* 在光标处插入内容
|
263
|
+
* @param data
|
264
|
+
*/
|
265
|
+
onInsertContent(data: {
|
266
|
+
text: string;
|
267
|
+
doc: string;
|
268
|
+
}): void;
|
261
269
|
/**
|
262
270
|
* 处理粘贴的内容
|
263
271
|
* @private
|
@@ -239,6 +239,7 @@ export declare class PageOptions {
|
|
239
239
|
}
|
240
240
|
export declare type OrientType = 'landscape' | 'portrait';
|
241
241
|
export declare type PageLayoutMode = 'singlePage' | 'multiPage' | 'fit-page';
|
242
|
+
export declare type DataDecoratorMode = 'none' | 'outline' | 'background' | 'all';
|
242
243
|
export declare class ViewOptions {
|
243
244
|
copyRightInfo: string;
|
244
245
|
trialVersion: boolean;
|
@@ -260,13 +261,19 @@ export declare class ViewOptions {
|
|
260
261
|
showDataEleDecorator: boolean;
|
261
262
|
dataEleEmptyBgColor: string;
|
262
263
|
dataEleMouseEnterBgColor: string;
|
264
|
+
dataEleMouseEnterDecoratorMode: DataDecoratorMode;
|
263
265
|
dataEleReadOnlyBgColor: string;
|
264
266
|
dataEleFocusedBgColor: string;
|
267
|
+
dataEleFocusedDecoratorMode: DataDecoratorMode;
|
265
268
|
dataEleNormalBgColor: string;
|
269
|
+
dataEleOutlineColor: string;
|
270
|
+
dataGroupOutlineColor: string;
|
266
271
|
dataEleErrorBgColor: string;
|
267
272
|
dataGroupDecoratorNormalColor: string;
|
268
273
|
dataGroupDecoratorMouseEnterColor: string;
|
274
|
+
dataGroupMouseEnterDecoratorMode: DataDecoratorMode;
|
269
275
|
dataGroupDecoratorFocusedColor: string;
|
276
|
+
dataGroupFocusedDecoratorMode: DataDecoratorMode;
|
270
277
|
dataGroupNormalBgColor: string;
|
271
278
|
dataGroupEmptyBgColor: string;
|
272
279
|
dataGroupMouseEnterBgColor: string;
|
@@ -280,7 +287,6 @@ export declare class ViewOptions {
|
|
280
287
|
trackDelColor: string;
|
281
288
|
showLineRect: boolean;
|
282
289
|
showCharRect: boolean;
|
283
|
-
dataEleDecoratorMode: 'none' | 'outline' | 'overlay';
|
284
290
|
showTabChar: boolean;
|
285
291
|
showSpaceChar: boolean;
|
286
292
|
showLineBreak: boolean;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Element, ElementFactory, IBeginMeasureData, ICreateRenderData, InlineGroupElement, LeafElement } from "../../element-define";
|
1
|
+
import { Element, ElementFactory, IBeginMeasureData, ICreateRenderData, InlineGroupElement, LeafElement, Position } from "../../element-define";
|
2
2
|
import { IEditorVNodeOptions, InlineGroupRenderObject, RenderObject } from "../../render-define";
|
3
3
|
import { GotCursorEvent } from "../../element-event-define";
|
4
4
|
import { DataEleBaseProps, TextProps } from "../../element-props";
|
@@ -110,4 +110,11 @@ export declare function renderErrorTip(event: IEditorVNodeOptions, r: InlineGrou
|
|
110
110
|
* 渲染底部波浪线
|
111
111
|
*/
|
112
112
|
export declare function renderUnderWavyLine(event: IEditorVNodeOptions, r: InlineGroupRenderObject, color: string): void;
|
113
|
+
/**
|
114
|
+
* 获取渲染元素相对稳当的位置
|
115
|
+
* @param render
|
116
|
+
* @param refPos
|
117
|
+
*/
|
118
|
+
export declare function getRenderPosToDoc(render: RenderObject, refPos?: Position | null): Position;
|
119
|
+
export declare function getCurrentParaGroupRenders(r: InlineGroupRenderObject): InlineGroupRenderObject[];
|
113
120
|
export declare function renderUnderline(event: IEditorVNodeOptions, render: RenderObject): void;
|