From a94fe72bd1912909a33ee4a0659e8e1590b55b94 Mon Sep 17 00:00:00 2001
From: Czy <651525974@qq.com>
Date: Mon, 17 Mar 2025 10:26:29 +0800
Subject: [PATCH] fix: unexpected table selection behavior (#5821)
---
docs/walkthroughs/05-executing-commands.md | 4 +++-
site/examples/js/tables.jsx | 8 +++++++-
site/examples/ts/tables.tsx | 8 +++++++-
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/docs/walkthroughs/05-executing-commands.md b/docs/walkthroughs/05-executing-commands.md
index de09d1ace..b02330d1d 100644
--- a/docs/walkthroughs/05-executing-commands.md
+++ b/docs/walkthroughs/05-executing-commands.md
@@ -53,7 +53,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
}
diff --git a/site/examples/js/tables.jsx b/site/examples/js/tables.jsx
index 955581cc5..9e670dbc3 100644
--- a/site/examples/js/tables.jsx
+++ b/site/examples/js/tables.jsx
@@ -8,6 +8,7 @@ import {
} from 'slate'
import { withHistory } from 'slate-history'
import { Editable, Slate, withReact } from 'slate-react'
+import { css } from '@emotion/css'
const TablesExample = () => {
const renderElement = useCallback(props =>