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

How to sync HTML code into the source edit of RTE's misctools?

neilbertm664043
Level 4
Level 4

Is it possible to sync HTML code into the source edit of RTE's misctools?

adobeforums.png

1 Accepted Solution
MaxBarrass
Correct answer by
Level 3
Level 3

Short answer No, especially for what you are trying to do and how you are going about it.

You are trying to load another HTML page contents into RTE in a component.

What you could do to do this:

1. Create a new "HTML Content Load", it should allow a user to select a Path in content tree for the content they want to load and add it to the RTE. This widget should be based on RTE widget but have a new button that would allow loading of content form the repository.

2. Have a good think of what you are doing exactly and what could happen if people can modify source of your pages and if you are still good with that, you can then take inspiration from this AEM Fiddle . Source is available on github.

Have fun!

View solution in original post

6 Replies
kautuk_sahni
Community Manager
Community Manager

I have asked the expert to have a look at this one.

~kautuk

kautuk_sahni
Community Manager
Community Manager

Reply from the expert is:-

All you need to is a simple JCR listener to put the header.html code in RTE backed property (something like name=./text) – so when the user opens RTE the content of header.html shows up.

~kautuk

kautuk_sahni
Community Manager
Community Manager

Once done, do share the package with small documentation. So that we can create a Helpx article for the rest of the community.

smacdonald2008​ What do you say ?

~kautuk

neilbertm664043
Level 4
Level 4

im having a hard time creating a JCR listener... can someone help me?? sorry im a beginner

MaxBarrass
Correct answer by
Level 3
Level 3

Short answer No, especially for what you are trying to do and how you are going about it.

You are trying to load another HTML page contents into RTE in a component.

What you could do to do this:

1. Create a new "HTML Content Load", it should allow a user to select a Path in content tree for the content they want to load and add it to the RTE. This widget should be based on RTE widget but have a new button that would allow loading of content form the repository.

2. Have a good think of what you are doing exactly and what could happen if people can modify source of your pages and if you are still good with that, you can then take inspiration from this AEM Fiddle . Source is available on github.

Have fun!

View solution in original post