Hi, I'm trying applyComponents function on rich text items (such as a!richTe

Hi, I'm trying applyComponents function on rich text items (such as a!richTextItem, a!richTextNumberedList, etc) by applying it on the 'value' of a!richTextField but it doesn't return anything at all. Does applyComponents doesn't work on rich text items?

Below is the snippet of my codes.

OriginalPostID-218581

OriginalPostID-218581

  Discussion posts and replies are publicly visible

Parents
  • @kumaraveln - I did some test cases and found your point to be true.
    When we return only a single a!richTextItem it is rendered by the applycomponents correctly.
    But if you see the interface we are returning the a!richTextItem if throws a error stating.

    "Interface Definition: Not a valid component. Received: [values=Test ]"

    Please refer the attached screenshot.

    As per my knowledge, a!richTextItem might not be a valid component and should be used in association with the a!richTextDisplayField.
    So, when we use only a!richTextItem it throws the above mentioned error and when we use it with association of a!richTextDisplayField( here using applycomponents) it renders correctly.
    So my point here is the a!richTextItem is a valid/complete component only if it is used in association of a a!richTextDisplayField component.

    Correct me if I am wrong.

Reply
  • @kumaraveln - I did some test cases and found your point to be true.
    When we return only a single a!richTextItem it is rendered by the applycomponents correctly.
    But if you see the interface we are returning the a!richTextItem if throws a error stating.

    "Interface Definition: Not a valid component. Received: [values=Test ]"

    Please refer the attached screenshot.

    As per my knowledge, a!richTextItem might not be a valid component and should be used in association with the a!richTextDisplayField.
    So, when we use only a!richTextItem it throws the above mentioned error and when we use it with association of a!richTextDisplayField( here using applycomponents) it renders correctly.
    So my point here is the a!richTextItem is a valid/complete component only if it is used in association of a a!richTextDisplayField component.

    Correct me if I am wrong.

Children
No Data