Are you trying to add the JS in the RTE? If you are the tinymceconfig.config has a validelements section in it that specifies what elements are allowed. Script is not in there by default.
I would suggest that you put your code into a macro and enable the macro to be added to the Rich text editor. This way you will be able to insert it without needing to worry about modifying any config files.
I'm not entiry sure what and how you are trying, but it sounds like the Twitter package might be useful ? But I'm sure you have to add the JS in the header of your page (probably your main masterpage).
I'm having a similar issue but I had already thought to wrap my code up in a macro. I've created a widget on twitter and the code looks like the following:
<a class="twitter-timeline" href="https://twitter.com/CloudwiseSE" data-widget-id="271651085133942785">Tweets by @XXXXXXXXXX</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
I've then created a HTML script in Umbraco and pasted the code in, from here i then created the macro. When i insert the macro either in my page or into the content editor the twitter widget does not show at all, even when vewing source. There are no errors on the page either.
Twitter Feed
Our site currently uses Umbraco CMS. Each time I try to add the javascript for a twitter feed to the HTML of a page, Umbraco removes it.
How can I do this?
Thanks!
Are you trying to add the JS in the RTE? If you are the tinymceconfig.config has a validelements section in it that specifies what elements are allowed. Script is not in there by default.
I would suggest that you put your code into a macro and enable the macro to be added to the Rich text editor. This way you will be able to insert it without needing to worry about modifying any config files.
Peter
Have you had a look at the Twitter package for Umbraco?
http://our.umbraco.org/projects/twitter-for-umbraco
I'm not entiry sure what and how you are trying, but it sounds like the Twitter package might be useful ? But I'm sure you have to add the JS in the header of your page (probably your main masterpage).
- Morten
I'm having a similar issue but I had already thought to wrap my code up in a macro. I've created a widget on twitter and the code looks like the following:
<a class="twitter-timeline" href="https://twitter.com/CloudwiseSE" data-widget-id="271651085133942785">Tweets by @XXXXXXXXXX</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
I've then created a HTML script in Umbraco and pasted the code in, from here i then created the macro. When i insert the macro either in my page or into the content editor the twitter widget does not show at all, even when vewing source. There are no errors on the page either.
I'm running an MVC site with Umbraco 4.10.1.
TIA
S
is working on a reply...