@ones-editor/editor 2.8.38 → 2.8.40

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.
@@ -1,5 +1,5 @@
1
1
  import { OnesEditorDocRange } from '../../doc';
2
- import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange } from '../../types';
2
+ import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange, SimpleBlockPosition } from '../../types';
3
3
  import { EditorSimpleBlockPosition } from '../editor-position';
4
4
  interface SimpleRangeOptions {
5
5
  anchor: EditorSimpleBlockPosition;
@@ -13,7 +13,7 @@ export default class EditorSimpleSelectionRange implements SelectionRange {
13
13
  constructor(editor: OnesEditor, options: SimpleRangeOptions);
14
14
  isCollapsed(): boolean;
15
15
  isEqual(other: SelectionRange): boolean;
16
- isSimple(): boolean;
16
+ isSimple(): this is SimpleBlockPosition;
17
17
  isReverse(): boolean;
18
18
  getEditor(): OnesEditor;
19
19
  get start(): EditorSimpleBlockPosition;
@@ -583,6 +583,8 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
583
583
  getParentContainer: (block: BlockElement) => ContainerElement;
584
584
  reloadBlock: (block: BlockElement) => void;
585
585
  contains: (node: Node) => boolean;
586
+ scrollable: () => boolean;
587
+ setScrollable: (scrollable: boolean) => void;
586
588
  getSelectedText: () => string;
587
589
  clearSelectedContents: () => void;
588
590
  insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange, options?: InsertBlockOptions) => BlockElement;
@@ -2,3 +2,4 @@ export declare function isOfficeHtml(html: string): boolean;
2
2
  export declare function isInlineElem(elem: Element): boolean;
3
3
  export declare function isTextBlockElem(elem: Element): boolean;
4
4
  export declare function replaceCrLf(text: string): string;
5
+ export declare function replaceCrLfWithSpace(text: string): string;
@@ -4,5 +4,6 @@ export declare class CommentItem implements ToolbarItem {
4
4
  id: string;
5
5
  name: string;
6
6
  icon: string;
7
+ adding: boolean;
7
8
  onClick(editor: OnesEditor, item: ToolbarItem): void;
8
9
  }