Issue in Custom RTE in 6.3 | Community
Skip to main content
dhratiagarwal
March 13, 2018
Solved

Issue in Custom RTE in 6.3

  • March 13, 2018
  • 3 replies
  • 1782 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijayalakshmi_S

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.

3 replies

Vijayalakshmi_S
Level 10
March 13, 2018

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.

dhratiagarwal
March 14, 2018

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.

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
March 15, 2018

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.