Skip to content

Missing Block Content ID for Visual Builder Integration #148

@rawnanoob

Description

@rawnanoob

The visual builder requires the data-epi-block-id attribute for proper component rendering and interaction, but there is currently no way to retrieve the block/content key from the Infer type.

Expected Behavior
We should be able to retrieve and use the block ID like this:

export default function FAQ({ opti }: FAQProps) {
  const { pa } = getPreviewUtils(opti);
  return (
    <section 
      className="about-us"
      data-epi-block-id={opti.key} // ← This should be available
    >
      <h2>{opti.heading}</h2>
      <div className="about-us-content">
        <div className="about-us-text">
          <div
            {...pa('body')}
            dangerouslySetInnerHTML={{ __html: opti.body?.html ?? '' }}
          />
        </div>
      </div>
    </section>
  );
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions