From 04ecbb45c5137156ba8b59d688601a12c275d2c4 Mon Sep 17 00:00:00 2001 From: Dalton Date: Thu, 16 May 2024 11:49:18 -1000 Subject: [PATCH] [lexical-playground][lexical-react][lexical] Feature: Theme class added to horizontal rule node (#6090) --- .../html/HTMLCopyAndPaste.spec.mjs | 25 +++++++-- .../html/ListsHTMLCopyAndPaste.spec.mjs | 5 +- .../__tests__/e2e/HorizontalRule.spec.mjs | 51 ++++++++++++++----- .../__tests__/e2e/Markdown.spec.mjs | 24 ++++++--- .../__tests__/e2e/Selection.spec.mjs | 2 +- packages/lexical-playground/src/index.css | 20 -------- .../src/themes/PlaygroundEditorTheme.css | 17 +++++++ .../src/themes/PlaygroundEditorTheme.ts | 1 + .../src/LexicalHorizontalRuleNode.tsx | 21 ++++++-- packages/lexical/src/LexicalEditor.ts | 1 + 10 files changed, 118 insertions(+), 49 deletions(-) diff --git a/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/HTMLCopyAndPaste.spec.mjs b/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/HTMLCopyAndPaste.spec.mjs index cb0a9bed93a..e2543ec0e1e 100644 --- a/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/HTMLCopyAndPaste.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/HTMLCopyAndPaste.spec.mjs @@ -208,8 +208,14 @@ test.describe('HTML CopyAndPaste', () => { await assertHTML( page, html` -
-
+
+
{ await assertHTML( page, html` -
+

Text between HRs

-
+
`, ); await assertSelection(page, { @@ -266,7 +278,10 @@ test.describe('HTML CopyAndPaste', () => { dir="ltr"> Hello

-
+

diff --git a/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/ListsHTMLCopyAndPaste.spec.mjs b/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/ListsHTMLCopyAndPaste.spec.mjs index dbb58e82d3c..34cf35623ab 100644 --- a/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/ListsHTMLCopyAndPaste.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/CopyAndPaste/html/ListsHTMLCopyAndPaste.spec.mjs @@ -391,7 +391,10 @@ test.describe('HTML Lists CopyAndPaste', () => { one -


+