Custom clientlibs in edit mode

Avatar

Avatar

jakej40603950

Avatar

jakej40603950

jakej40603950

16-03-2019

Hello,

I have noticed that if I open any page in touch UI edit mode (../editor.html/..), the custom clientlib javascript associated with the components get disabled.

For e.g. if there's a tab component and if the tab clicks are handled by custom javascript, the clicks don't work anymore in edit mode.

Is it possible to ensure the javascript remains functional even in edit mode?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

999

Correct Answer

829
Arun_Patidar
MVP

17-03-2019

Hi,

I think the problem is with the DOM here.

In edit mode your components actual DOM is loaded inside iframe and the component editable div loaded top of that, since this editable div and z-index higher so you can't interact with actual Dom in Edit mode.

E.g. Tab components, you must have to switch from edit to preview in order to edit another tab.

How to add parsys to Touch UI Tab Component 

Screenshot 2019-03-17 at 8.46.02 PM.png

Answers (3)

Answers (3)

Avatar

Avatar

Prince_Shivhare

Avatar

Prince_Shivhare

Prince_Shivhare

16-03-2019

Few things you should check --

1. check in error.log if you are getting any error.

2. console error if any.

3. I am not sure but you can try putting condition in your sightly like if edit mode, then apply the clientlib accordingly. if disable then apply the preview mode javascript.

let us know if you find anything in this.

~ Prince

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

16-03-2019

Go through the WEEKEND tutorial and you will see - once setup properly - clientlibs behave in TOuch UI, even in edit mode.

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

16-03-2019

Are you getting any error in the console ?