Skip to content

"use client" and macro in HTML editor #882

@anderslosvik

Description

@anderslosvik

Experiencing a problem with rendering a part (modal) that must have "use client" for state.
The problem is that the part has a richtext-editor that contains macros.
If "use client" is set it does not find the macro.
Version: "@enonic/nextjs-adapter": "^3.2.2"

Suggestion from @pmi:

  • You register you macro in ComponentRegistry
  • You page gets rendered on the server-side
  • You part is not rendered, however, because of "use client"
  • You part is rendered on the client
  • TextArea looks for the macro in ComponentRegistry
  • It doesn't find it because client-side ComponentRegistry is empty

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions