Re: Change styles for Table RTE plugin in Touch UI

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

840

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

840
Arun_Patidar
MVP

03-06-2020

Create a Component say table with dialog field style and rte(only with table and formatting, link plugins).

Create a wrapper div with style class

 

Example 

 

<div class="${properties.style ? properties.style : 'cmp-table__defualt'}">
 ${properties.tabletext @CONTEXT='html'}
</div>

 

 

If you want to make it generic,  then you can use custom style plugin, e.g. https://aemlab.blogspot.com/2019/07/aem-rte-custom-plugins-1.html

Replies

Avatar

Avatar

Aleksandre

Avatar

Aleksandre

Aleksandre

04-06-2020

Thank you so much for the answer.
I looked at your plugin, but unfortunately, this does not suit me for two reasons:
1) It would be difficult for the content author to add standard styles to each table.
2) This component doesn't change styles for tables. Perhaps it only works with text.

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

840

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

840
Arun_Patidar
MVP

04-06-2020

I would also suggest to go with simpler approach. The plugin actual works along with element selector, from RTE you have to select table element then you have to apply style, otherwise classes will be applied to text node.