I have included a js file in the content editor but it runs in the edit mode only. I have tried all the suggestions like
- Including text/javascript
- Include code between execfunc()
But it still doesn't work. Can someone please help me with this?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI have included a js file in the content editor but it runs in the edit mode only. I have tried all the suggestions like
But it still doesn't work. Can someone please help me with this?
Did you put the code directly inside the Content Editor? If so, try putting the code in a file in a document library and linking it to the Content Editor.
Another thing to check is if Minimal Download Strategy (MDS) is causing an issue. When the code is not working, does the URL contain "_layouts/15/start.aspx#"?