RTE source editor strips off div tags and other tags | Community
Skip to main content
Level 3
March 17, 2017
Solved

RTE source editor strips off div tags and other tags

  • March 17, 2017
  • 1 reply
  • 915 views
  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

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 kautuk_sahni

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

1 reply

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
March 29, 2017

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