SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was working on a migration of an existing site to SharePoint and when pasting the source code of the pages to the SharePoint RichText fields in the edit mode of the page, I tried to copy the HTML into the editor but the inline javascript code was completely removed.

How do I address it?

I have added 4 RichTextBoxes where I have put the HTML of an existing page and it displays correctly. If I use the whole definition in one of the textboxes, the other textboxes cannot use it as out of scope.

share|improve this question

I think you'd need to use "Content Editor Web Parts" if you're pasting in javascript which you intend to have working in a SharePoint page.

share|improve this answer
As a (very) late addition, use the HTML Form web part if you're using SharePoint 2010. – James Love Dec 21 '11 at 10:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.