@ones-editor/editor 2.2.8-beta.6 → 2.2.8-beta.7
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/@ones-editor/core/src/core/editor/editor-dom/dom-events.d.ts +2 -2
- package/@ones-editor/core/src/core/types.d.ts +2 -2
- package/@ones-editor/mathjax/package.json +2 -1
- package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +1 -0
- package/@ones-editor/to-docx/src/errors.d.ts +3 -0
- package/@ones-editor/to-docx/src/index.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +1 -0
- package/dist/index.js +76 -49
- package/package.json +2 -1
|
@@ -6,7 +6,7 @@ declare class DomEventHandler {
|
|
|
6
6
|
name: string;
|
|
7
7
|
handler: DomEventCallback;
|
|
8
8
|
data: unknown;
|
|
9
|
-
constructor(editor: OnesEditor, dom: Element | Document | Window, name: string, handler: DomEventCallback, data: unknown);
|
|
9
|
+
constructor(editor: OnesEditor, dom: Element | Document | Window, name: string, handler: DomEventCallback, data: unknown, options?: boolean | AddEventListenerOptions);
|
|
10
10
|
handleEvent: (event: Event) => void;
|
|
11
11
|
destroy(): void;
|
|
12
12
|
}
|
|
@@ -15,7 +15,7 @@ export declare class EditorDomEvents {
|
|
|
15
15
|
handlers: Map<Element | Document | Window, DomEventHandler[]>;
|
|
16
16
|
constructor(editor: OnesEditor);
|
|
17
17
|
destroy(): void;
|
|
18
|
-
addEventListener<T = Event>(element: Element | Document | Window, eventName: string, eventHandler: DomEventCallback<T>, data?: unknown): void;
|
|
18
|
+
addEventListener<T = Event>(element: Element | Document | Window, eventName: string, eventHandler: DomEventCallback<T>, data?: unknown, options?: boolean | AddEventListenerOptions): void;
|
|
19
19
|
removeEventListener(element: Element | Document | Window | null, eventName: string | null, eventHandler: DomEventCallback): void;
|
|
20
20
|
removeAllListeners(element: Element | Document | Window, eventName?: string): void;
|
|
21
21
|
}
|
|
@@ -513,7 +513,7 @@ export interface CloneBlockResultInfo {
|
|
|
513
513
|
boxIdMap: Map<string, string>;
|
|
514
514
|
}
|
|
515
515
|
export interface OnesEditorDomEvents extends OnesEditorCustom {
|
|
516
|
-
addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
|
|
516
|
+
addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void, options?: boolean | AddEventListenerOptions) => void;
|
|
517
517
|
removeEventListener: (element: Element | Document | Window | null, eventName: string | null, eventHandler: (editor: OnesEditor, event: Event) => void) => void;
|
|
518
518
|
removeAllListeners: (element: Element | Document | Window, eventName?: string) => void;
|
|
519
519
|
}
|
|
@@ -646,7 +646,7 @@ export interface OnesEditorInput {
|
|
|
646
646
|
readonly inputElement: HTMLTextAreaElement;
|
|
647
647
|
getInput: () => HTMLTextAreaElement;
|
|
648
648
|
destroy: () => void;
|
|
649
|
-
focus: () => void;
|
|
649
|
+
focus: (options?: FocusOptions) => void;
|
|
650
650
|
handleDocumentSelectionChange: () => void;
|
|
651
651
|
handleCompositionstart: (event: CompositionEvent) => void;
|
|
652
652
|
handleCompositionend: (event: CompositionEvent) => void;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
7
7
|
"devDependencies": {
|
|
8
|
+
"@types/lodash.clonedeep": "^4.5.0",
|
|
8
9
|
"@types/lodash.debounce": "^4.0.7",
|
|
9
|
-
"@types/lodash.
|
|
10
|
+
"@types/lodash.memoize": "^4.1.9"
|
|
10
11
|
},
|
|
11
12
|
"types": "src/index.d.ts"
|
|
12
13
|
}
|
|
@@ -6,6 +6,7 @@ export default class MathjaxEditor {
|
|
|
6
6
|
editMathjaxPopup: Popup | null;
|
|
7
7
|
onChange: OnEditChange | null;
|
|
8
8
|
tex: string;
|
|
9
|
+
oldTex: string;
|
|
9
10
|
private observer;
|
|
10
11
|
editMathjax(elem: HTMLElement, tex: string, onChange: OnEditChange, options?: ManualShowCommandBarOptions): void;
|
|
11
12
|
handleClose: (commandBar: AbstractCommandBar) => void;
|