Skip to content

Map tag with particular Component #339

Open
@natgeo89

Description

@natgeo89

I need to use particular React Component for JsonRTE entry.
My goal is to receive raw data from contentstack, and then for ol tag use <List>...</List> component with predefined logic and styles. But it is impossible with contentstack SDK / utils:

  jsonToHtml(jsonEntry, {
    customElementTypes: {
      ol: (attrs: string, child: string, jsonBlock: any, extraProps?: object) => <List>{child}</List>,
    },
  });

Callback for ol should always return a string...
How I can resolve this issue? Why there are no any proper utils for that?

Metadata

Metadata

Assignees

No one assigned

    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