I have a CEWP which contains HTML button and JS for functionality. The html editor of the cewp keeps removing certain links from my code and I'd rather just link to the source file. How do I link to a HTML file and JS file separately? Or should I just have one HTML file which tags?

  • Are you actually using a CEWP and not simply the default Rich Text field on a page? The two behave differently though they look almost identical. I do this all the time using a CEWP without an issue but trying to do this in the default Rich Text editor always results in what you are describing. – Dave Wise Aug 27 '13 at 15:21
  • Not sure, I'm definitely picking Content Editor Web Part, then I'll go into it and select HTML in the ribbon and insert my code there. – Batman Aug 27 '13 at 16:36

You can only link one file in the CEWP Link to Source box. You should be able to link to an HTML file that includes links to other resources like JS and CSS files in it.

| improve this answer | |
  • Yea that seems like a good solution actually. Thanks! – Batman Aug 27 '13 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.