@ones-editor/editor 2.8.38 → 2.8.39
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():
|
|
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;
|