Skip to content

Commit

Permalink
fix(lexical-editor-pb-element): support placeholder and children prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 committed Sep 14, 2024
1 parent fb02a23 commit 4227fa4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/lexical-editor-pb-element/src/LexicalEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import { StylesObject } from "@webiny/theme/types";
interface LexicalEditorProps {
type: "heading" | "paragraph";
value: LexicalValue | undefined;
placeholder?: string;
focus?: boolean;
onChange?: (value: LexicalValue) => void;
onBlur?: (editorState: LexicalValue) => void;
height?: number | string;
width?: number | string;
children?: React.ReactNode | React.ReactNode[];
}

export const LexicalEditor = ({ type, value, onChange, ...rest }: LexicalEditorProps) => {
Expand Down
2 changes: 2 additions & 0 deletions packages/lexical-editor-pb-element/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { TypographyDropDown } from "~/components/TypographyDropDown";
import { ParagraphEditorPreset } from "~/components/LexicalPresets/ParagraphEditorPreset";
import { HeadingEditorPreset } from "~/components/LexicalPresets/HeadingEditorPreset";

export * from "./LexicalEditor";

export const LexicalEditorPlugin = () => {
return (
<>
Expand Down

0 comments on commit 4227fa4

Please sign in to comment.