WordPress.org

Ready to get started?Download WordPress

Forums

Ultimate TinyMCE
Code gets stripped (3 posts)

  1. pegasso4444
    Member
    Posted 2 years ago #

    Hi,
    I like this Editor but when I try to insert the following code to embed a SlideshowPro the code gets stripped by WordPress:

    <!-- START EMBED CODE -->
    
    <script type="text/javascript" src="http://localhost:8888/templates/gallery/m/embed.js"></script>
    
    <div id="album-6">
    
    </div>
    
    <script type="text/javascript">
    	SlideShowPro({
    		attributes: {
    			id: "album-6",
    			width: 640,
    			height: 510
    		},
    		mobile: {
    			auto: false
    		},
    		params: {
    			bgcolor: "#000000",
    			allowfullscreen: true
    		},
    		flashvars: {
    			xmlFilePath: "http://localhost:8888/templates/gallery/images.php?album=6",
    			paramXMLPath: "http://localhost:8888/templates/gallery/m/params/diashow.xml"
    		}
    	});
    </script>
    
    <!-- END EMBED CODE -->

    How can i stop WP from doing this?
    Thanks for your help
    Peter

    http://wordpress.org/extend/plugins/ultimate-tinymce/

  2. Josh (WP Edit)
    Volunteer Moderator
    Plugin Author

    Posted 2 years ago #

    Hi Peter,

    WordPress isn't really designed to handle javascript within the post/page.

    Instead, it's best to hook your javascript to your header, and then call it as needed.

    I don't use the SlideShowPro plugin, so I'm not sure how it's intended to be used. Are there any help files, or a support forum, explaining how to insert the javascript?

  3. ronbme
    Member
    Posted 2 years ago #

    I was having the same problem with the "insert/edit embedded media" function in the editor.

    I can insert most videos by copying the embed code and pasting it in the "Source" tab of the "insert/edit embedded media" function. But if it a <script>, it won't let me do it in the Visual editor.

    I can go into the HTML editor and paste the code, then save the file and it works.

    Maybe not the best way to handle it, but it works in a pinch.

    Ron

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic