@ones-editor/editor 2.9.8-beta.2 → 2.9.8-beta.21
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/cke-html/package.json +7 -0
- package/@ones-editor/cke-html/src/html/cke-html.d.ts +4 -0
- package/@ones-editor/cke-html/src/html/combine-html.d.ts +2 -0
- package/@ones-editor/cke-html/src/html/comment.d.ts +6 -0
- package/@ones-editor/cke-html/src/html/converter.d.ts +7 -0
- package/@ones-editor/cke-html/src/html/data-helper/link-data.d.ts +0 -0
- package/@ones-editor/cke-html/src/html/image.d.ts +4 -0
- package/@ones-editor/cke-html/src/html/link.d.ts +2 -0
- package/@ones-editor/cke-html/src/html/markdown.d.ts +2 -0
- package/@ones-editor/cke-html/src/html/mention.d.ts +4 -0
- package/@ones-editor/cke-html/src/index.d.ts +2 -0
- package/@ones-editor/core/src/core/doc/doc.d.ts +2 -1
- package/@ones-editor/core/src/core/editor-doc/editor-doc.d.ts +1 -0
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/core/src/local-doc/index.d.ts +1 -0
- package/@ones-editor/core/src/users/remote-users.d.ts +1 -1
- package/@ones-editor/server-tools/src/index.d.ts +4 -1
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +5 -0
- package/@ones-editor/versions/src/history-doc/history-doc.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +428 -79
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DocObject, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare function ckeHtml2Doc(html: string): DocObject;
|
|
3
|
+
export declare function injectDocToCkeHtmlFragment(htmlFragment: string, doc: DocObject, text?: string): string;
|
|
4
|
+
export declare function editorToCKEHtml(editor: OnesEditor): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DocObject, DocComment } from '../../../../@ones-editor/core';
|
|
2
|
+
import type { CkeHtmlConverter } from './converter';
|
|
3
|
+
export declare const CkeCommentConverter: CkeHtmlConverter;
|
|
4
|
+
export declare function processCkeCommentsLink(doc: DocObject): void;
|
|
5
|
+
export declare function convertAnnotateToComment(annotate: any): DocComment;
|
|
6
|
+
export declare function convertAnnotatesToComments(annotates: any[]): Record<string, DocComment>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface CkeHtmlConverter {
|
|
2
|
+
filter: (node: Node) => boolean;
|
|
3
|
+
replacement: (content: any, node: HTMLElement) => string;
|
|
4
|
+
}
|
|
5
|
+
export declare function registerCKEHtmlConvert(name: string, converter: CkeHtmlConverter): void;
|
|
6
|
+
export declare function getTurndownRootElement(node: Node): Node;
|
|
7
|
+
export declare function patchForEmptyBlock(key: string, node: Node, className: string): void;
|
|
File without changes
|
|
@@ -177,7 +177,7 @@ export interface OnesEditorRemoteUsers extends TypedEmitter<RemoteUsersEvents> {
|
|
|
177
177
|
findUser: (userId: string) => OnesEditorUser | null;
|
|
178
178
|
removeUser: (clientId: string) => void;
|
|
179
179
|
updateUsers: (users: OnesEditorUser[]) => void;
|
|
180
|
-
getSimpleCursors: (blockId: string) => Map<number, OnesEditorClientSelection[]>;
|
|
180
|
+
getSimpleCursors: (blockId: string, excludeUserId?: string) => Map<number, OnesEditorClientSelection[]>;
|
|
181
181
|
getCursors: (blockId: string) => OnesEditorClientSelection[];
|
|
182
182
|
onUpdateBlockText: (blockData: DocBlock, actions: DocBlockTextActions, local: boolean) => void;
|
|
183
183
|
getFixedUserColor: (userId: string, type: 'flag' | 'selection') => string;
|
|
@@ -256,6 +256,7 @@ export interface OnesEditorDoc extends OnesEditorDocServer {
|
|
|
256
256
|
endBatchUpdate: () => number;
|
|
257
257
|
triggerReAuth?: (auto?: boolean) => void;
|
|
258
258
|
rawData?: () => DocObject;
|
|
259
|
+
applyingOps?: () => boolean;
|
|
259
260
|
}
|
|
260
261
|
export interface OnesEditorDocHistoryData {
|
|
261
262
|
user: {
|
|
@@ -8,6 +8,7 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
|
|
|
8
8
|
constructor(editor: OnesEditor, externalDoc: OnesEditorDoc, localEvents: EditorDocLocalActionCallbacks);
|
|
9
9
|
beginBatchUpdate(): number;
|
|
10
10
|
endBatchUpdate(): number;
|
|
11
|
+
applyingOps(): boolean;
|
|
11
12
|
registerLocalEvents(events: EditorDocLocalActionCallbacks): void;
|
|
12
13
|
toJSON(): DocObject;
|
|
13
14
|
getVersionHelper(): import("../doc").OnesEditorDocVersionHelper | undefined;
|
|
@@ -551,6 +551,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
551
551
|
readonly settingsProvider: OnesEditorSettingsProvider;
|
|
552
552
|
version: string;
|
|
553
553
|
readonly: boolean;
|
|
554
|
+
destroyed: boolean;
|
|
554
555
|
addCustom: <T extends OnesEditorCustom>(name: string, creator: OnesEditorCustomCreator<T>) => T;
|
|
555
556
|
getCustom: <T extends OnesEditorCustom>(name: string) => T;
|
|
556
557
|
replaceCustom: <T extends OnesEditorCustom>(name: string, newCustom: T) => T;
|
|
@@ -11,6 +11,7 @@ export declare class LocalDoc extends EventCallbacks<OnesEditorDocCallbacks> imp
|
|
|
11
11
|
endBatchUpdate(): number;
|
|
12
12
|
toJSON(): DocObject;
|
|
13
13
|
rawData(): DocObject;
|
|
14
|
+
applyingOps(): boolean;
|
|
14
15
|
getContainerBlocks(containerId: string): DocBlock[];
|
|
15
16
|
findContainerBlocks(containerId: string): DocBlock[];
|
|
16
17
|
getBlockData(containerId: string, blockIndex: number): DocBlock;
|
|
@@ -12,7 +12,7 @@ declare class RemoteUsers extends TypedEmitter<RemoteUsersEvents> implements One
|
|
|
12
12
|
findUser(userId: string): OnesEditorUser | null;
|
|
13
13
|
removeUser(clientId: string): void;
|
|
14
14
|
updateUsers(users: OnesEditorUser[]): void;
|
|
15
|
-
getSimpleCursors(blockId: string): Map<number, OnesEditorClientSelection[]>;
|
|
15
|
+
getSimpleCursors(blockId: string, excludeUserId?: string): Map<number, OnesEditorClientSelection[]>;
|
|
16
16
|
getCursors(blockId: string): OnesEditorClientSelection[];
|
|
17
17
|
onUpdateBlockText(blockData: DocBlock, actions: DocBlockTextActions, local: boolean): void;
|
|
18
18
|
getFixedUserColor(userId: string, type: 'flag' | 'selection'): string;
|
|
@@ -16,9 +16,11 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
|
|
|
16
16
|
disableLogout: boolean;
|
|
17
17
|
destroyed: boolean;
|
|
18
18
|
editStatus: EditStatus;
|
|
19
|
+
_applyingOps: boolean;
|
|
19
20
|
constructor(options: ShareDBDocOptions, client: ShareDBClient, doc: Doc, disableLogout?: boolean);
|
|
20
21
|
beginBatchUpdate(): number;
|
|
21
22
|
endBatchUpdate(): number;
|
|
23
|
+
applyingOps(): boolean;
|
|
22
24
|
static load(options: ShareDBDocOptions): Promise<ShareDBDoc>;
|
|
23
25
|
private handleNothingPending;
|
|
24
26
|
private handleCreate;
|