Expand my Community achievements bar.

SOLVED

Issue in Custom RTE in 6.3

Avatar

Level 1

In AEM 6.3, I am trying to create a new style in custom RTE using below link.

Configuring Experience Manager Rich Text Editor Plugins in a Touch UI Component Dialog

Each time when I change the style, the span tag is getting newly created inside the older span tag instead of replacing the older one.

For eg: If I add the 'default span' style first for Touch text and later if i  change it to 'lead', In this case latest added style should be applied for this text, where as in our case both the style are getting added. Even though latest style is getting applied, span classes are getting appended on every change.

Is there any way where we can replace the latest style to the same span class instead of appending it with old one. Please refer the attached screen shot.

custom_rte.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Behaviour is per the functionality of OOB Styles Plugin. We can consider writing custom plugin to meet the requirement above.

  • Either highlighting the style (in the dropdown) which is already applied (kinda means to know the style that is already applied) or
  • when we select some style replace the existing one instead of creating new span with class.

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

Applying and removing the style works by selecting and deselecting (selecting it again) respectively.

In this case, after selecting the text "Touch" in the editor area, select "defaultSpan"  class -> it will remove the respective span and will retain the span with "lead" class alone.

Avatar

Level 1

Actually I had a requirement where authors find difficult to findout the style they have authored earlier.

1. So Is there any way where this issue overcomes and author gets to know which style they have applied.

2. Is there a way that the style in the span class can get replaced instead of getting created a new one each time on style change.

Avatar

Correct answer by
Community Advisor

Hi,

Behaviour is per the functionality of OOB Styles Plugin. We can consider writing custom plugin to meet the requirement above.

  • Either highlighting the style (in the dropdown) which is already applied (kinda means to know the style that is already applied) or
  • when we select some style replace the existing one instead of creating new span with class.