1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00

Fix example types (#5812)

* fix: types for richtext.tsx

* fix: types for check-lists, code-highlighting and custom placeholder

* fix: types for editable-voids, embeds, forced-layout, hovering-toolbar

* fix: types for remaining examples

* fix: typescript error for files in image element

* fix: types for examples and some minor fixes

* fix: normalize-tokens.ts type

* fix: types for [example].tsx
This commit is contained in:
Ravi Lamkoti
2025-03-10 21:50:10 +05:30
committed by GitHub
parent 7a8ab18c52
commit 4f992cff5c
43 changed files with 935 additions and 592 deletions

View File

@@ -90,7 +90,9 @@ const App = () => {
Transforms.setNodes(
editor,
{ type: match ? 'paragraph' : 'code' },
{ match: n => Element.isElement(n) && Editor.isBlock(editor, n) }
{
match: n => Element.isElement(n) && Editor.isBlock(editor, n),
}
)
break
}
@@ -178,7 +180,9 @@ const App = () => {
Transforms.setNodes(
editor,
{ type: match ? null : 'code' },
{ match: n => Element.isElement(n) && Editor.isBlock(editor, n) }
{
match: n => Element.isElement(n) && Editor.isBlock(editor, n),
}
)
break
}