Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Add HorizontalRuleNode to LexicalRichText Component. (#31)
Browse files Browse the repository at this point in the history
This PR enables a new Lexical Node-type for our `LexicalRichText` Component.
This Node-type, `HorizontalRuleNode` allows for people to easily change
alignment (left, right, center) of text.

TEST=manual

Ensured that I could parse and render an AST with the new Node-type.
  • Loading branch information
tmeyer2115 authored Jul 17, 2023
1 parent 6849be8 commit ce0a089
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- .github/workflows/semgrep.yml
schedule:
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
- cron: '50 2 * * *'
- cron: "50 2 * * *"
jobs:
semgrep:
name: semgrep/ci
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/react-components",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"author": "[email protected]",
"types": "./lib/esm/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions src/components/richText/LexicalRichText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ListPlugin } from "@lexical/react/LexicalListPlugin";
import { CodeHighlightNode, CodeNode } from "@lexical/code";
import { AutoLinkNode, LinkNode } from "@lexical/link";
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
import { HorizontalRuleNode } from "@lexical/react/LexicalHorizontalRuleNode";
import { HashtagNode } from "@lexical/hashtag";
import { EditorThemeClasses } from "lexical";
import DefaultNodeStyling from "./DefaultStyling";
Expand Down Expand Up @@ -79,6 +80,7 @@ function generateConfig(
TableRowNode,
AutoLinkNode,
LinkNode,
HorizontalRuleNode,
],
};
}

0 comments on commit ce0a089

Please sign in to comment.