Adding color and font size plugin to Table component(RTE)

Avatar

Avatar

pallavis8124480

Avatar

pallavis8124480

pallavis8124480

05-04-2018

Hi ,

I want to create a Table component where I can add color(different colors) to each cell and also increase or decrease the font size.
Please guide me.

I am using AEM 6.2 version.

Thanks,Pallavi

Replies

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

6.0K

Likes

1.1K

Correct Reply

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

6.0K

Likes

1.1K

Correct Reply

1.1K
kautuk_sahni
Community Manager

06-04-2018

See this question: How add new style class for Cell Properties in richtext' table plugin in touch ui dialog

In the documentation it is mentioned that:

1. Styles will only be available when editing a table within a Text component (or derivative), not the standard Table component.

2. Currently, you can define styles for tables and cells in Classic-UI only.

But you can use a way mentioned Table component cell properties color selector for cell background color - 6.2 SP1

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

06-04-2018

See the AEM FAQ blog here - it is covered -- Scott's Digital Community: Adobe Experience Manager FAQs and other Tips

(See How can I apply color to a Table in the RTE? )

Avatar

Avatar

pallavis8124480

Avatar

pallavis8124480

pallavis8124480

08-04-2018

Hi Kautuk /Smac,

Thanks for your reply.

http://experience-aem.blogspot.in/2016/04/aem-62-touch-ui-dialog-rte-rich-text-editor-color-picker-p...  - I referred this article and tried to implement the same for applying background color to each cell.

I came to know that I need to make some changes to the below method. I wanted to apply custom css class in the attributes section so can you please let me know how can I refer to a css style sheet here ?

  _getTagObject: function(color) {
            return {
                "tag": "span",
                "attributes": {
                    "style" : "color: " + color
                }
            };
        },

Also please post the link where I can get the documentation of the APIs used in the JS.

Thanks