Expand my Community achievements bar.

New Component with title and body text

Avatar

Level 1

Hi all,

 

I need to create a new component that consists of a title and a body text. The title can be set in the properties of the component, but I'm not certain how to create the body since it needs to be rich text. As far as I'm aware of, I can not have a rich text field in the component properties - is that correct?

 

So I was thinking to enclose an input field in:

<c:if test="${isEditMode}">
    <label for="messageboxBody">First name:</label>
    <input type="text" id="messageboxBody" name="messageboxBody">
</c:if>

 and save the entry. But how can I do that? And is this the best approach or would there be an alternative to it?

 

Thanks...

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Employee

Hi @markolo ,

Could you confirm if you are using Foundation components or core-components based Adaptive Forms.

 

Assuming core-components:

Currently core components do not have an OOTB component for capturing Rich text from the form filler. Though you could create a custom component which captures Rich text - this would require:

  • Referencing an existing core-component (e.g. textinput) and creating a custom component.
  • Using a custom library - enable Rich Text features for the text area
  • Update the view for your custom component to return the required data value from your custom library.