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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user