Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(h) {
- var html = "<div id='REPLACE-ME-video' class='swfembed' movie='URL' mheight='HEIGHT' mwidth='WIDTH'>Witty comment about needing Javascript goes here...</div>";
- var sel = h.selection;
- if (null == sel || '' == sel.toString()) {
- return html;
- }
- html = html.replace('WIDTH', /width="(\d+)"/.exec(sel)[1]);
- html = html.replace('HEIGHT', /height="(\d+)"/.exec(sel)[1]);
- html = html.replace('URL', /src="([^\"]+)"/.exec(sel)[1]);
- return html;
- }
Add Comment
Please, Sign In to add comment