From 98c879d9d83a890b33a045c28c8b2c52a41a1bac Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 18 Nov 2024 14:29:59 +0800 Subject: [PATCH] =?UTF-8?q?todo:=20=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LexicalEditor/styles.css | 20 +++++++++++++++++++ .../LexicalEditor/themes/ExampleTheme.js | 4 +++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/components/LexicalEditor/styles.css b/src/components/LexicalEditor/styles.css index 48fb8e2..1378496 100644 --- a/src/components/LexicalEditor/styles.css +++ b/src/components/LexicalEditor/styles.css @@ -1096,3 +1096,23 @@ min-width: 100%; color: #000; overflow: hidden; } + +.editor-table { +border-collapse: collapse; +border-spacing: 0; +overflow-y: scroll; +overflow-x: scroll; +table-layout: fixed; +width: fit-content; +margin: 0px 25px 30px 0px; +} + +.editor-tableCell { +border: 1px solid #bbb; +/* width: 75px; */ +vertical-align: top; +text-align: start; +padding: 6px 8px; +position: relative; +outline: none; +} diff --git a/src/components/LexicalEditor/themes/ExampleTheme.js b/src/components/LexicalEditor/themes/ExampleTheme.js index ecd4bdd..6e0aebf 100644 --- a/src/components/LexicalEditor/themes/ExampleTheme.js +++ b/src/components/LexicalEditor/themes/ExampleTheme.js @@ -64,7 +64,9 @@ const exampleTheme = { tag: "editor-tokenProperty", url: "editor-tokenOperator", variable: "editor-tokenVariable" - } + }, + table: 'editor-table', + tableCell: 'editor-tableCell', }; export default exampleTheme;