@ones-editor/editor 1.1.23 → 1.1.24

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.
@@ -17,7 +17,9 @@ export declare class EditorSelection implements OnesEditorSelection {
17
17
  selectBlock(block: BlockElement, start: number, end?: number, options?: ChangeSelectionOptions): void;
18
18
  setSelection(anchor: BlockPosition, focus?: BlockPosition, options?: ChangeSelectionOptions): SelectionRange;
19
19
  setRange(range: SelectionRange, options?: ChangeSelectionOptions): SelectionRange;
20
- updateSelection(): void;
20
+ updateSelection(oldRange: SelectionRange | null, options?: {
21
+ focusBlockChanged: boolean;
22
+ }): void;
21
23
  getFocusedPos(): BlockPosition;
22
24
  getAnchorPos(): BlockPosition;
23
25
  selectionChanging(anchor: BlockPosition, focus: BlockPosition): boolean;
@@ -568,7 +568,9 @@ export interface OnesEditorSelection {
568
568
  setSelection: (anchor: BlockPosition, focus?: BlockPosition, options?: ChangeSelectionOptions) => SelectionRange;
569
569
  setRange: (range: SelectionRange, options?: ChangeSelectionOptions) => SelectionRange;
570
570
  selectBlock: (block: BlockElement, start: number, end?: number, options?: ChangeSelectionOptions) => void;
571
- updateSelection: (old: SelectionRange | null) => void;
571
+ updateSelection: (old: SelectionRange | null, options?: {
572
+ focusBlockChanged: boolean;
573
+ }) => void;
572
574
  updateLastCaretRect: () => void;
573
575
  getSuggestedCaretX: () => number | undefined;
574
576
  getAnchorPos: () => BlockPosition;
@@ -12,6 +12,7 @@ declare class EnforceWithDocumentTitleHandler implements OnesEditorInputHandler
12
12
  handleSelectionChange: (editor: OnesEditor) => void;
13
13
  private reload;
14
14
  private applyPlaceholder;
15
+ private removePlaceholder;
15
16
  private isDocumentTitleBlock;
16
17
  }
17
18
  export default EnforceWithDocumentTitleHandler;
@@ -3,4 +3,5 @@ import { EnforceWithDocumentTitleHandlerOptions } from './types';
3
3
  export declare function isEmptyTextBlockWithoutCompositionText(editor: OnesEditor, block: BlockElement): boolean;
4
4
  export declare function removePlaceholderFromBlock(editor: OnesEditor, block: BlockElement): void;
5
5
  export declare function applyPlaceholderToBlock(editor: OnesEditor, block: BlockElement, placeholder: string | Element): void;
6
+ export declare function removeAllPlaceholders(editor: OnesEditor): void;
6
7
  export declare function applyPlaceholder(editor: OnesEditor, options: EnforceWithDocumentTitleHandlerOptions): void;
@@ -0,0 +1,2 @@
1
+ import { DocObject, OnesEditor, SelectedBlock } from '../../../../@ones-editor/core';
2
+ export declare function selectionToDoc(editor: OnesEditor, selectedBlock: SelectedBlock): DocObject;