@ones-editor/editor 2.8.36 → 2.8.37-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.
@@ -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,16 @@ 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
- constructor(editor: OnesEditor, parent: HTMLElement);
16
+ toolbarFullScreen?: FixedToolbar;
17
+ constructor(editor: OnesEditor, parent: HTMLElement, options?: MainToolbarOptions);
12
18
  destroy(): void;
13
19
  setItems(items: ToolbarItem[]): void;
14
20
  getItems(): ToolbarItem[];
@@ -13,5 +13,5 @@ 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
- export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertImageItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | CommentItem | ColorItem | MoreItem)[];
16
+ 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 | CommentItem | ColorItem | MoreItem)[];
17
17
  export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, MoreItem, };