@ones-editor/editor 2.9.7 → 2.9.8-beta.2
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/composition/editor-input.d.ts +1 -0
- package/@ones-editor/core/src/core/doc/doc.d.ts +2 -0
- package/@ones-editor/core/src/core/input-handler/remove-unknown-components.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/index.d.ts +8 -1
- package/@ones-editor/main-toolbar/src/items/file.d.ts +8 -0
- package/@ones-editor/main-toolbar/src/items/index.d.ts +4 -2
- package/@ones-editor/main-toolbar/src/items/mention.d.ts +8 -0
- package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +3 -0
- package/@ones-editor/main-toolbar/src/locale/zh-hant-hk.d.ts +3 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +8 -7
- package/@ones-editor/ui-base/src/icons/index.d.ts +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +391 -130
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ export declare class EditorInput implements OnesEditorInput {
|
|
|
28
28
|
composingTimer: NodeJS.Timeout | undefined;
|
|
29
29
|
callbacks: EditorInputCallbacks;
|
|
30
30
|
inputElement: HTMLTextAreaElement;
|
|
31
|
+
private focused;
|
|
31
32
|
constructor(editor: OnesEditor, callbacks: EditorInputCallbacks);
|
|
32
33
|
private isInCommandBar;
|
|
33
34
|
destroy(): void;
|
|
@@ -139,8 +139,10 @@ export interface OnesEditorDocCallbacks {
|
|
|
139
139
|
onStatusChanged?: (status: OnesEditorDocStatus) => void;
|
|
140
140
|
onError?: (error: Error) => void;
|
|
141
141
|
}
|
|
142
|
+
export type OnesEditorResourceType = 'image' | 'media' | 'file' | 'graph' | 'paste' | 'unknown';
|
|
142
143
|
export interface UploadResourceOptions {
|
|
143
144
|
onProgress?: (progress: number) => void;
|
|
145
|
+
resourceType?: OnesEditorResourceType;
|
|
144
146
|
}
|
|
145
147
|
export interface UploadResourceResult {
|
|
146
148
|
resourceId: string;
|
|
@@ -5,10 +5,17 @@ import './locale';
|
|
|
5
5
|
import './style.scss';
|
|
6
6
|
export * from './types';
|
|
7
7
|
export * from './items';
|
|
8
|
+
export interface MainToolbarOptions {
|
|
9
|
+
enableFullScreen?: boolean;
|
|
10
|
+
onFullScreenClick?: (editor: OnesEditor, item: CommandItem) => void;
|
|
11
|
+
}
|
|
8
12
|
export declare class MainToolbar implements OnesEditorCustom {
|
|
9
13
|
private editor;
|
|
14
|
+
private options;
|
|
10
15
|
toolbar: FixedToolbar;
|
|
11
|
-
|
|
16
|
+
toolbarFullScreen?: FixedToolbar;
|
|
17
|
+
root: HTMLElement;
|
|
18
|
+
constructor(editor: OnesEditor, parent: HTMLElement, options?: MainToolbarOptions);
|
|
12
19
|
destroy(): void;
|
|
13
20
|
setItems(items: ToolbarItem[]): void;
|
|
14
21
|
getItems(): ToolbarItem[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ToolbarItem } from '../types';
|
|
3
|
+
export declare class InsertFileItem implements ToolbarItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
onClick(editor: OnesEditor, item: ToolbarItem): Promise<void>;
|
|
8
|
+
}
|
|
@@ -13,5 +13,7 @@ import { FindReplaceItem } from './find';
|
|
|
13
13
|
import { CommentItem } from './comment';
|
|
14
14
|
import { ColorItem } from './text-color';
|
|
15
15
|
import { MoreItem } from './more-item';
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
import { InsertFileItem } from './file';
|
|
17
|
+
import { InsertMentionItem } from './mention';
|
|
18
|
+
export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | ColorItem)[];
|
|
19
|
+
export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertFileItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, MoreItem, InsertMentionItem, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ToolbarItem } from '../types';
|
|
3
|
+
export declare class InsertMentionItem implements ToolbarItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
onClick(editor: OnesEditor, item: ToolbarItem): void;
|
|
8
|
+
}
|