Is it possible to add javascript in rte? If yes, then how?

Avatar

Avatar
Validate 25
MVP
Himanshu_Singhal
MVP

Likes

65 likes

Total Posts

206 posts

Correct reply

23 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 25
MVP
Himanshu_Singhal
MVP

Likes

65 likes

Total Posts

206 posts

Correct reply

23 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
Himanshu_Singhal
MVP

13-03-2017

There are some community articles that show use of RTE and script - see this as an example: 

http://experience-aem.blogspot.ca/2015/01/aem-6-sp1-touch-ui-rich-text-editor-plugin-to-upper-case.h...

View Entire Topic

Avatar

Avatar
Boost 1
Level 1
vinayk70574604
Level 1

Like

1 like

Total Posts

5 posts

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
vinayk70574604
Level 1

Like

1 like

Total Posts

5 posts

Correct reply

1 solution
Top badges earned
Boost 1
Affirm 1
View profile
vinayk70574604
Level 1

14-03-2017

Hi Himanshu,

Could you explain a little more about the requirement which requires author to place a code(<script>), because this doesn't look like a good practice? If the content has to be beautified or modified for some reasons, it can always be done in the component's script (sightly or JSP). Further if you still have such a requirement to do, you may try:

WhitespaceProcessor.js is restricting few tags by default, you might update this to ignore the tags you want.

You could refer this post for more help:

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...