Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

RTE-Remove new line character before save event

Avatar

Level 2

Hi ,

I have to parse the RTE(Rich Text Editor) content data before saving for example needed to remove some new line(\n) and carriage return(\r)  characters before save.

Please advice.smacdonald2008

Thanks,

Manjunath DJ

1 Accepted Solution

Avatar

Correct answer by
Level 10

I would use it within a HTL component and read the RTE value in Java and then manipulate it using a Java API.

View solution in original post

6 Replies

Avatar

Correct answer by
Level 10

I would use it within a HTL component and read the RTE value in Java and then manipulate it using a Java API.

Avatar

Level 2

Hi smacdonald2008

I need to store the values back to crx with formatted data.since we are accessing the for json format for service purpose.

Avatar

Level 10

If you want to modify before reading it - I recommend looking through this blog to see if he has written a blog on how to modify the content using  JS/plug-in. Something similar to this one:

Experiencing Adobe Experience Manager - Day CQ: AEM 61 - Extend TouchUI Rich Text Editor Table Plugi...

Avatar

Level 10

Some internal ppl recommended that you also look here:

Yes – a modified version of this should help

https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/546

Avatar

Level 2

While parsing the RTE data in JSON from java newline characters are converted to '\n' so as suggested reading the RTE value in Java and then manipulate it using a Java API works fine.

Thanks,

Manjunath DJ