0

I am trying to display a terms and conditions agreement using a rich text field and display that rich text field in a lightning component using

<lightning:formattedRichText value="{!v.rich_text_field__c}" />

The text is displaying as desired, but I would like to have multiple check boxes inserted at every paragraph instead of just using a lighting checkbox at the bottom. Is there any way to dynamically insert checkboxes?

1

I would rather think that to be more complicated approach rather than using a single checkbox outside the content itself because you would have then required to capture the checked property of the individual checkboxes those would have been rendered. And I will think that could really get complex.

Aside from this, going by the docs, it doesn't seem you will be able to achieve what you are trying to using lightning:formattedRichText. If you refer to the Supported HTML Tags and Attributes section in the documentation, it doesn't seem to support any input type tags. You can find the complete list of supported tags out in the documentations. It also mentions:

If you set unsupported tags via a client-side controller, those tags are removed and the text content is preserved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.