-
-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
57 additions
and
105 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
|
||
"@udecode/slate-plugins-core": major | ||
------------------------------------ | ||
|
||
- renamed: | ||
- `useTSlate` to `useEditorState` | ||
- `useTSlateStatic` to `useEditorRef` | ||
- `useStoreEditor` to `useStoreEditorRef` | ||
- removed: | ||
- `useEditorId` in favor of `useEditorRef().id` | ||
- `useEditorOptions` in favor of `useEditorRef().options` | ||
- `useSlatePluginOptions` in favor of | ||
`getSlatePluginOptions(useEditorRef(), pluginKey)` | ||
- `useSlatePluginType` in favor of | ||
`getSlatePluginType(useEditorRef(), pluginKey)` | ||
- `pipeOnDOMBeforeInput` in favor of `pipeHandler` | ||
- `pipeOnKeyDown` in favor of `pipeHandler` | ||
- types: | ||
- renamed: | ||
- `SlatePluginsState` to `SlatePluginsStates` | ||
- `State` to `SlatePluginsState` | ||
- removed: | ||
- `OnDOMBeforeInput` in favor of | ||
- `OnKeyDown` in favor of `KeyboardHandler` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
"@udecode/slate-plugins-core": minor | ||
--- | ||
|
||
- `useEditableProps` (used by `SlatePlugins`): | ||
- new fields returned: all handler props from the plugins (if defined) | ||
- new core plugins with the following fields: | ||
- `onFocus: setEventEditorId('focus', id)` | ||
- `onBlur: setEventEditorId('blur', id)` | ||
- You can add your own handlers in a plugin | ||
- `EditorStateEffect`: a new component used by `SlatePlugins` to update | ||
the editor state. | ||
- `setEventEditorId`: a new action. Set an editor id by event key. | ||
- `eventEditorStore`, `useEventEditorStore`: a new store. Store where | ||
the keys are event names and the values are editor ids. | ||
- `useEventEditorId`: a new selector. Get the editor id by `event` | ||
key. | ||
- `useStoreEditorSelection`: a new selector. Get the editor selection | ||
which is updated on editor change. | ||
- `useStoreEditorState`: a new selector. Get editor state which is | ||
updated on editor change. Similar to `useSlate`. | ||
- `SlatePlugin`: the previous plugin could implement the following | ||
handlers: `onChange`, `onDOMBeforeInput` and `onKeyDown`. The plugins | ||
now implement all DOM handlers: clipboard, composition, focus, form, | ||
image, keyboard, media, mouse, selection, touch, pointer, ui, wheel | ||
animation and transition events. | ||
- `SlatePluginsState` (store interface): | ||
- a new field `keyChange` incremented by | ||
`SlatePlugins` on `useSlate` update. | ||
- a new field `selection = editor.selection` updated on `useSlate` | ||
update. | ||
- `pipeHandler`: a new function. Generic pipe for handlers. |