Custom clientlibs in edit mode | Community
Skip to main content
Level 5
Mar 16, 2019 12:11 PM UTC
Solved

Custom clientlibs in edit mode

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Mar 17, 2019 7:57 PM UTC

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 

Arun Patidar

4 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Mar 17, 2019 7:57 PM UTC

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 

Translate
Arun Patidar
Prince_Shivhare
New Participant
Mar 17, 2019 4:12 AM UTC

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

Translate
smacdonald2008
Level 10
Mar 16, 2019 8:44 PM UTC

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

Translate
VeenaVikraman
New Participant
Mar 16, 2019 1:55 PM UTC

Are you getting any error in the console ?

Translate