Skip to main content
Level 6
May 28, 2021 9:44 AM UTC
Solved

Table component in AEM

I am using AEM 6.5 AND i have a component in which RTE plugin is available for the description field. Through this RTE I can add table to my description. I wanted to have some enhacements like adding color to cell background, font color, alignment etc.

Can someone suggest best approach for this? 

Thanks ahead!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
Community Advisor
May 28, 2021 11:36 AM UTC

Not sure if you can use custom styling plugin to add styling to cell, row, table using css

https://aemlab.blogspot.com/2019/07/aem-rte-custom-plugins-1.html

 

Arun Patidar

2 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
May 28, 2021 11:36 AM UTC

Not sure if you can use custom styling plugin to add styling to cell, row, table using css

https://aemlab.blogspot.com/2019/07/aem-rte-custom-plugins-1.html

 

Translate
Arun Patidar
New Member
Jul 19, 2024 1:00 PM UTC

<!-- /apps/your-project/components/custom-table/custom-table.html -->
<div class="custom-table">
<table>
<thead>
<tr>
<!-- Generate table headers -->
<sly data-sly-use.table="com.example.CustomTable">
<sly data-sly-repeat.header="${table.getHeaders()}">
<th>${header}</th>
</sly>
</sly>
</tr>
</thead>
<tbody>
<!-- Generate table rows and columns based on the provided data -->
<sly data-sly-use.table="com.example.CustomTable">
<sly data-sly-repeat.row="${table.getRows()}">
<tr>
<sly data-sly-repeat.col="${table.getColumns()}">
<td>Row ${row.index + 1}, Col ${col.index + 1}</td>
</sly>
</tr>
</sly>
</sly>
</tbody>
</table>
</div>

Translate