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 source editor strips off div tags and other tags

Avatar

Level 3
  1. whitespaceProcessor.js (there are two of these, so make sure you’re modifying the one for the touch ui - /etc/clientlibs/granite/coralui/optional/rte/js/core/
  2. HTMLSerializer.js

 

In WhitespaceProcessor in tagname look at DEFAULT_REMOVAL_RULES and remove the ones that shouldn’t be removed, also change keepChildren to “true” (this should keep it from removing the other nodes)

 

In HTMLSerializer change the serializeTextNode method to return the value without the replace.

 

I have followed above steps to make work but no luck . Currently I am working on 6.2

 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Administrator

Reply from the experts are:

You should be modifying the RTE files under ‘/etc/clientlibs/granite/coralui2/optional/rte/js/core/’ not "/etc/clientlibs/granite/coralui/optional/rte/js/core/’.

Please try and let me know, if this works.

~kautuk

View solution in original post

1 Reply

Avatar

Correct answer by
Administrator

Reply from the experts are:

You should be modifying the RTE files under ‘/etc/clientlibs/granite/coralui2/optional/rte/js/core/’ not "/etc/clientlibs/granite/coralui/optional/rte/js/core/’.

Please try and let me know, if this works.

~kautuk