@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.
- package/@ones-editor/core/src/core/selection/editor-selection.d.ts +3 -1
- package/@ones-editor/core/src/core/types.d.ts +3 -1
- package/@ones-editor/input-handlers/src/enforce-with-document-title/enforce-with-document-title-handler.d.ts +1 -0
- package/@ones-editor/input-handlers/src/enforce-with-document-title/placeholder.d.ts +1 -0
- package/@ones-editor/list-block/src/converter/selection-to-doc.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/types.d.ts +1 -1
- package/dist/index.js +144 -144
- package/package.json +1 -1
|
@@ -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(
|
|
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
|
|
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;
|