Skip to content

Commit

Permalink
Merge pull request #568 from prezly/fix/care-5939-not-wysiwyg
Browse files Browse the repository at this point in the history
[CARE-5939] Expose `align` as HTML attribute on Callouts and Blockquotes
  • Loading branch information
e1himself authored Aug 9, 2024
2 parents 9d4305b + 867239d commit 321b1a3
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 321b1a3

Please sign in to comment.