refactor(core): separate editor & doc mode (#7873)

doc.mode -> primaryMode
(*new) editor.mode

New Service:
editor service

Change Mode:

```
const editor = useService(EditorService).editor;
editor.setMode('page')
```

Change primary mode

```
const editor = useService(EditorService).editor;
editor.doc.setPrimaryMode('page')
```
This commit is contained in:
EYHN
2024-08-14 11:43:03 +00:00
parent 50948318e0
commit 89537e6892
51 changed files with 453 additions and 379 deletions

View File

@@ -6,7 +6,7 @@ type SimpleRadioItem = string;
export interface RadioProps extends RadioGroupItemProps {
items: RadioItem[] | SimpleRadioItem[];
value: any;
onChange: (value: any) => void;
onChange?: (value: any) => void;
/**
* Total width of the radio group, items will be evenly distributed