Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
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



Kautuk Sahni

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



Kautuk Sahni