Welcome to the OnlineVideos plugin for TinyMCE 2.0+ 1. Summary mceOnlineVideos allows you to add YouTube and Google Videos to your TinyMCE editor by only providing the video's URL. Another great feature about mceOnlineVideos, is it doesn't require you to open up your valid_elements code to use the , , and tags. Instead, we use an image placeholder and require a small bit of code when outputing the text. It is more complicated because you have to add a line in your presentation code (a PHP example is provided below), but it is much more secure then most other plugins out there. 2. Installation 2.1 Download mceOnlineVideos from http://projects.alkaloid.net/ 2.2 Copy the onlinevideos folder into your TinyMCE plugins directory. 2.3 Edit your tiny_mce_config as follows: 2.3.1 Add "onlinevideos" to you plugin list. 2.3.2 Our image placeholder code requires the following valid_code addition "img[class|alt|!src|width|height]". Please note that the order of the attributes is important for our replacement code (see below), don't change it unless you understand how the regular expression replace code (below) works. 2.3.3 Add either "onlinevideosYT" or "onlinevideosGV" (or both) to your button list. 2.4 Add the following code or similar when outputing the text, the following is in PHP: function UnscrubText($text) { $pattern = '/]*>/si'; $text = preg_replace_callback($pattern, 'ConvertToOnlineVideo', $text); return $text; } function ConvertToOnlineVideo($match) { switch($match[1]) { case "GV": $code = ""; break; case "YT": $code = ""; break; default: $code = ""; } return $code; } --------------------------------------------- You can find mceOnlineVideos and documentation at: http://projects.alkaloid.net/ or http://www.brybot.ca/ I welcome any contributors! Send any comments, questions, or BUGS to: Bryan Rite