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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

RTE Color Picker Not working

vivianseba
Level 2
Level 2

Hi,

I have upgraded application from AEM 6.4.2 to AEM 6.4.8.2 SP and after the upgrade In the RTE color picker feature is not working and getting the dialog like below

vivianseba_1-1601474221525.png

 

I have referred this blog - http://experience-aem.blogspot.com/2018/05/aem-64-touch-ui-rte-rich-text-editor-color-picker-plugin....  and implemented the RTE color picker feature in aem 6.4.2.
Could you please suggest with solution for this issue ?

 

1 Accepted Solution
Vishalverma
Correct answer by
Level 2
Level 2

@vivianseba Try adding below check before calling function addDialogTemplate() in color-picker.js;

if (document.location.pathname.indexOf("/editor.html/") > -1) {
        addDialogTemplate();
    }

View solution in original post

14 Replies
vivianseba
Level 2
Level 2

Hi Vanegi,
I have implemented the RTE color picker with this aem 6.4 link --> http://experience-aem.blogspot.com/2018/05/aem-64-touch-ui-rte-rich-text-editor-color-picker-plugin....
Should i need to implement like your mentioned link --> http://experience-aem.blogspot.com/2017/06/aem-63-touch-ui-rte-rich-text-editor-color-picker-plugin-...
Please suggest?
After the migration from 6.4.2 to 6.4.8.2 SP i am getting the below error message in the console while selecting the color picker.

vivianseba_0-1601552417100.png

 

Vishalverma
Correct answer by
Level 2
Level 2

@vivianseba Try adding below check before calling function addDialogTemplate() in color-picker.js;

if (document.location.pathname.indexOf("/editor.html/") > -1) {
        addDialogTemplate();
    }

View solution in original post

vivianseba
Level 2
Level 2

Hi,
I have added the above mentioned code in color-picker.js file and it's not working.

 

Vishalverma
Level 2
Level 2

Is there any console error you are getting ? Can you cross check if popover dialog url is correct in color-picker.js Check this constant value PICKER_URL.

vivianseba
Level 2
Level 2

Yes i am getting the below console error and PICKER_URL path is correctly configured.

vivianseba_0-1601547786048.png


After adding your below code snippet above mentioned error was fixed 

if (document.location.pathname.indexOf("/editor.html/") > -1) {
        addDialogTemplate();
    }
But now i am getting some other error in console now
 
vivianseba_0-1601555199737.pngvivianseba_1-1601555269073.png

Could you help me with the fix for this issue ?

 

 

vivianseba
Level 2
Level 2

Hi Arun,
I have checked and underscore.js is loading fine.

vivianseba_0-1601874380333.png

 

 

 
 
 

 

vivianseba
Level 2
Level 2

Thank you Arun for sharing the link and I have implemented RTE color picker as suggested,Then
I have checked the color picker by clicking the icon and the i am getting the empty dialog screen with the below mentioned console error.
AEM version:6.4.8.2

vivianseba_0-1602058837214.png

vivianseba_1-1602058953825.png

Could you please help me to fix this issue ?

 

 

Arun_Patidar
Community Advisor
Community Advisor
It could be issue with AEM version, can you try in other version of AEM may be in 6.5?
pkrish61
Level 1
Level 1

If you are still facing the issue, 

 

Create underscore.js and handlebars.js files in color picker component's client libs and add them to js.txt before component.js name. It appears aem 6.4.8.2 is not loading the required dependencies so we had to add them into component client libs.

kautuk_sahni
Community Manager
Community Manager
@pkrish61 Thank you for sharing the answer with community. Please keep this wonderful community work Going. AEM community needs SMEs like you. Thank you.