Say you’ve become the office expert on food trucks. There are a lot of hungry people in your office, and you just don’t have time to keep them all updated on mobile meatballs. Why not add a Twitter list widget to your intranet site so they can track the trucks themselves?
The Content Editor web part sounds like the perfect place to insert the code that Twitter generates for you. So, you add a web part to your page, open the HTML source editor, and paste in the widget script. You’ll get a warning message, but let’s ignore that for now:
Everything looks great, but let’s clean it up a little.
Obviously, you’ll want to get rid of that Content Editor title above the widget by changing the chrome type to none, but as soon as you do, the widget duplicates itself:
As it turns out, SharePoint 2010 made some changes to the way the content editor handles JavaScript in order to combat cross-site scripting. Rather than being generated on the fly, the HTML is created and saved in the source each time the web part is updated. To prevent this problem, simply upload your script to a document library and point to it in the content editor’s content link setting.
The widget will stop duplicating itself, SharePoint will stop warning you about your HTML source, and you can get back to enjoying delicious, spaceship-delivered tamales.
Thanks a lot, very usefull