mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
refactor(editor): merge inline to std (#11025)
This commit is contained in:
@@ -11,13 +11,6 @@
|
||||
- [~~BlockService~~](classes/BlockService.md)
|
||||
- [CommandManager](classes/CommandManager.md)
|
||||
- [LifeCycleWatcher](classes/LifeCycleWatcher.md)
|
||||
- [RangeBinding](classes/RangeBinding.md)
|
||||
- [RangeManager](classes/RangeManager.md)
|
||||
|
||||
## Variables
|
||||
|
||||
- [RANGE\_QUERY\_EXCLUDE\_ATTR](variables/RANGE_QUERY_EXCLUDE_ATTR.md)
|
||||
- [RANGE\_SYNC\_EXCLUDE\_ATTR](variables/RANGE_SYNC_EXCLUDE_ATTR.md)
|
||||
|
||||
## Functions
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ In the life cycle watcher, the methods will be called in the following order:
|
||||
## Extended by
|
||||
|
||||
- [`CommandManager`](CommandManager.md)
|
||||
- [`RangeManager`](RangeManager.md)
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
[**@blocksuite/block-std**](../../../../@blocksuite/block-std/README.md)
|
||||
|
||||
***
|
||||
|
||||
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-std](../../README.md) / [index](../README.md) / RangeBinding
|
||||
|
||||
# Class: RangeBinding
|
||||
|
||||
Two-way binding between native range and text selection
|
||||
@@ -1,121 +0,0 @@
|
||||
[**@blocksuite/block-std**](../../../../@blocksuite/block-std/README.md)
|
||||
|
||||
***
|
||||
|
||||
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-std](../../README.md) / [index](../README.md) / RangeManager
|
||||
|
||||
# Class: RangeManager
|
||||
|
||||
CRUD for Range and TextSelection
|
||||
|
||||
## Extends
|
||||
|
||||
- [`LifeCycleWatcher`](LifeCycleWatcher.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### created()
|
||||
|
||||
> **created**(): `void`
|
||||
|
||||
Called when std is created.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`LifeCycleWatcher`](LifeCycleWatcher.md).[`created`](LifeCycleWatcher.md#created)
|
||||
|
||||
***
|
||||
|
||||
### getSelectedBlockComponentsByRange()
|
||||
|
||||
> **getSelectedBlockComponentsByRange**(`range`, `options`): `BlockComponent`\<`BlockModel`\<`object`\>, [`BlockService`](BlockService.md), `string`\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
##### range
|
||||
|
||||
`Range`
|
||||
|
||||
##### options
|
||||
|
||||
###### match?
|
||||
|
||||
(`el`) => `boolean`
|
||||
|
||||
###### mode?
|
||||
|
||||
`"flat"` \| `"all"` \| `"highest"`
|
||||
|
||||
#### Returns
|
||||
|
||||
`BlockComponent`\<`BlockModel`\<`object`\>, [`BlockService`](BlockService.md), `string`\>[]
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
aaa
|
||||
b[bb
|
||||
ccc
|
||||
ddd
|
||||
ee]e
|
||||
|
||||
all mode: [aaa, bbb, ccc, ddd, eee]
|
||||
flat mode: [bbb, ccc, ddd, eee]
|
||||
highest mode: [bbb, ddd]
|
||||
|
||||
match function will be evaluated before filtering using mode
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### mounted()
|
||||
|
||||
> **mounted**(): `void`
|
||||
|
||||
Called when editor host is mounted.
|
||||
Which means the editor host emit the `connectedCallback` lifecycle event.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[`LifeCycleWatcher`](LifeCycleWatcher.md).[`mounted`](LifeCycleWatcher.md#mounted)
|
||||
|
||||
***
|
||||
|
||||
### rendered()
|
||||
|
||||
> **rendered**(): `void`
|
||||
|
||||
Called when `std.render` is called.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`LifeCycleWatcher`](LifeCycleWatcher.md).[`rendered`](LifeCycleWatcher.md#rendered)
|
||||
|
||||
***
|
||||
|
||||
### unmounted()
|
||||
|
||||
> **unmounted**(): `void`
|
||||
|
||||
Called when editor host is unmounted.
|
||||
Which means the editor host emit the `disconnectedCallback` lifecycle event.
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[`LifeCycleWatcher`](LifeCycleWatcher.md).[`unmounted`](LifeCycleWatcher.md#unmounted)
|
||||
@@ -1,11 +0,0 @@
|
||||
[**@blocksuite/block-std**](../../../../@blocksuite/block-std/README.md)
|
||||
|
||||
***
|
||||
|
||||
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-std](../../README.md) / [index](../README.md) / RANGE\_QUERY\_EXCLUDE\_ATTR
|
||||
|
||||
# Variable: RANGE\_QUERY\_EXCLUDE\_ATTR
|
||||
|
||||
> `const` **RANGE\_QUERY\_EXCLUDE\_ATTR**: `"data-range-query-exclude"` = `'data-range-query-exclude'`
|
||||
|
||||
Used to exclude certain elements when using `getSelectedBlockComponentsByRange`.
|
||||
@@ -1,11 +0,0 @@
|
||||
[**@blocksuite/block-std**](../../../../@blocksuite/block-std/README.md)
|
||||
|
||||
***
|
||||
|
||||
[BlockSuite API Documentation](../../../../README.md) / [@blocksuite/block-std](../../README.md) / [index](../README.md) / RANGE\_SYNC\_EXCLUDE\_ATTR
|
||||
|
||||
# Variable: RANGE\_SYNC\_EXCLUDE\_ATTR
|
||||
|
||||
> `const` **RANGE\_SYNC\_EXCLUDE\_ATTR**: `"data-range-sync-exclude"` = `'data-range-sync-exclude'`
|
||||
|
||||
Used to mark certain elements so that they are excluded when synchronizing the native range and text selection (such as database block).
|
||||
Reference in New Issue
Block a user