[WIKI-829] fix: add option to only show placeholder on empty editor (#8232)
* feat: add placeholderOnEmpty functionality to editor components * Update packages/editor/src/core/extensions/placeholder.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: rename placeholderOnEmpty to showPlaceholderOnEmpty across editor components * chore : make optional --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
2f45bfb7f6
commit
69b64680d1
8 changed files with 23 additions and 2 deletions
|
|
@ -72,6 +72,7 @@ export const LiteTextEditor = React.forwardRef(function LiteTextEditor(
|
|||
placeholder = t("issue.comments.placeholder"),
|
||||
disabledExtensions: additionalDisabledExtensions = [],
|
||||
editorClassName = "",
|
||||
showPlaceholderOnEmpty = true,
|
||||
...rest
|
||||
} = props;
|
||||
// states
|
||||
|
|
@ -154,6 +155,7 @@ export const LiteTextEditor = React.forwardRef(function LiteTextEditor(
|
|||
}),
|
||||
}}
|
||||
placeholder={placeholder}
|
||||
showPlaceholderOnEmpty={showPlaceholderOnEmpty}
|
||||
containerClassName={cn(containerClassName, "relative", {
|
||||
"p-2": !editable,
|
||||
})}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue