@ones-editor/editor 2.8.15-beta.2 → 2.8.15
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/editor/actions/break-text-block.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/list-block/src/index.d.ts +1 -0
- package/@ones-editor/list-block/src/keyboard/enter.d.ts +3 -1
- package/@ones-editor/list-block/src/keyboard/index.d.ts +2 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/helper/break-text-block.d.ts +2 -0
- package/dist/helper/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +28 -12
- package/package.json +1 -1
|
@@ -4,5 +4,5 @@ export interface BreakTextBlockResult {
|
|
|
4
4
|
block: BlockElement;
|
|
5
5
|
newBlock: BlockElement;
|
|
6
6
|
}
|
|
7
|
-
export declare function copyBlockAttributes(editor: OnesEditor, block: BlockElement): DocBlockAttributes;
|
|
7
|
+
export declare function copyBlockAttributes(editor: OnesEditor, block: BlockElement, options?: BreakTextOptions): DocBlockAttributes;
|
|
8
8
|
export declare function editorBreakTextBlock(editor: OnesEditor, block: BlockElement, offset: number, options?: BreakTextOptions): BreakTextBlockResult;
|
|
@@ -426,6 +426,7 @@ export interface BreakTextOptions {
|
|
|
426
426
|
forceInsertAfter?: boolean;
|
|
427
427
|
newBlockData?: DocBlock;
|
|
428
428
|
copyBlockAttributes?: boolean;
|
|
429
|
+
copyHeading?: boolean;
|
|
429
430
|
}
|
|
430
431
|
export interface OnesEditorEvents {
|
|
431
432
|
'docChanged': (editor: OnesEditor, local: boolean) => void;
|
|
@@ -8,6 +8,7 @@ import './lang';
|
|
|
8
8
|
import './style.scss';
|
|
9
9
|
import { ListPasteHandler } from './local-events/paste-handler';
|
|
10
10
|
import { handleTab, handleShiftTab } from './keyboard/tab';
|
|
11
|
+
export { autoBreakListBlock } from './keyboard/enter';
|
|
11
12
|
export { type ListOptions, type DocListBlock } from './types';
|
|
12
13
|
declare const ListBlock: TextKindBlock;
|
|
13
14
|
export * from './utils';
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare function breakListBlock(editor: OnesEditor, block: BlockElement, offset: number, attributesBlock: BlockElement): import("@ones-editor/core").BreakTextBlockResult;
|
|
3
|
+
export declare function autoBreakListBlock(editor: OnesEditor, block: BlockElement, offset: number): import("@ones-editor/core").BreakTextBlockResult;
|
|
2
4
|
export declare function handleEnter(editor: OnesEditor): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnesEditor, OnesEditorInputHandler } from '../../../../@ones-editor/core';
|
|
2
|
+
import { autoBreakListBlock } from './enter';
|
|
2
3
|
export default class ListBlockInputHandler implements OnesEditorInputHandler {
|
|
3
4
|
private editor;
|
|
4
5
|
constructor(editor: OnesEditor);
|
|
@@ -7,3 +8,4 @@ export default class ListBlockInputHandler implements OnesEditorInputHandler {
|
|
|
7
8
|
private handleBackspace;
|
|
8
9
|
private handleTab;
|
|
9
10
|
}
|
|
11
|
+
export { autoBreakListBlock, };
|