Skip to content

Commit

Permalink
[CARE-5939] Expose align as HTML attribute on Callouts and Blockquotes
Browse files Browse the repository at this point in the history
  • Loading branch information
e1himself committed Aug 9, 2024
1 parent 9d4305b commit 867239d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ export const BlockQuoteElement = forwardRef(
const isEmpty = EditorCommands.isNodeEmpty(editor, element);

return (
<div {...props} ref={ref} className={classNames(className, styles.BlockQuoteElement)}>
<div
{...props}
ref={ref}
className={classNames(className, styles.BlockQuoteElement)}
data-slate-block-align={align}
>
<NewParagraphDelimiter extendedHitArea element={element} position="top" />
<blockquote
className={classNames(className, styles.Quote, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ export const CalloutElement = forwardRef(
const isSelected = useSelected();

return (
<div {...props} ref={ref} className={classNames(className, styles.CalloutElement)}>
<div
{...props}
ref={ref}
className={classNames(className, styles.CalloutElement)}
data-slate-block-align={align}
>
<NewParagraphDelimiter extendedHitArea element={element} position="top" />
<div
className={classNames(className, styles.Callout, {
Expand Down

0 comments on commit 867239d

Please sign in to comment.