Skip to content

Question Regarding the Use of Plate v29 - Inquiry About the @udecode/cn Package #2840

Answered by zbeyens
SID9-HoneyBee asked this question in Q&A
Discussion options

You must be logged in to vote

Fixed in 29.0.1. Adding blockquote-element should not throw any error:

'use client';

import React from 'react';
import { cn, withRef } from '@udecode/cn';
import { PlateElement } from '@udecode/plate-common';

export const BlockquoteElement = withRef<typeof PlateElement>(
  ({ className, children, ...props }, ref) => {
    return (
      <PlateElement
        ref={ref}
        asChild
        className={cn('my-1 border-l-2 pl-6 italic', className)}
        {...props}
      >
        <blockquote>{children}</blockquote>
      </PlateElement>
    );
  }
);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@SID9-HoneyBee
Comment options

@zbeyens
Comment options

Answer selected by SID9-HoneyBee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants