Hi All,
the Source Edit Plugin is adding a "\r\n" line break after the content that you are authoring in a multifield dialog with richtext fields in Adobe Experience Manager (AEM).
I am facing an issue where I have a multifield dialog having richtext fields. and whenever I am authorthing any values using Source Edit Plugin. and saving dialog it will automatically save "\r\n" regex after the authored content init
example:
and store like :
and if we check properties in crx node it shows one line break [enter] in porpery.
How to resolve this?
Thanks
@kautuk_sahni @arunpatidar @BrianKasingli @Theo_Pendle
[Update]
I am reading the richtext value with name.\value, which is having \r\n in the last of which we authored in source edit plugin and I am reading it like ValueMap vm = multifield.getValueMap; vm.getOrDefault("Value",StringUtils.EMPTY).toString()); I am manipulate the string to reove \r\n from the last :
like:
String value = vm.getOrDefault("Value", StringUtils.EMPTY).toString();
value = value.trim();
or
String value = vm.getOrDefault("Value", StringUtils.EMPTY).toString();
value = StringUtils.stripEnd(value, "\r\n");
Could you please suggest me any other optimized solution.
Solved! Go to Solution.
Views
Replies
Total Likes
I have used below approach :
String value = vm.getOrDefault("Value", StringUtils.EMPTY).toString();
value = StringUtils.stripEnd(value, "\r\n");
Hi ,
similar question
string = string.replaceAll("(\\r\\n|\\n|\\r)", "");
Thanks
do we have any dialog level property implementation to remove line break for richText>? maybe cleanup="true"
@arunpatidar, @BrianKasingli, @SantoshSai , @lukasz-m @sachinarora, aanchal-sikka and krati_garg
Any help on this one?
Views
Replies
Total Likes
I have used below approach :
String value = vm.getOrDefault("Value", StringUtils.EMPTY).toString();
value = StringUtils.stripEnd(value, "\r\n");
Views
Likes
Replies