daily pastebin goal
64%
SHARE
TWEET

Flash Button on Quick Reply

a guest Mar 15th, 2012 34 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2. var sep = document.createElement('span');
  3. sep.innerHTML = '<img alt="|" style="vertical-align: middle;" src="http://illiweb.com/fa/wysiwyg/separator.png" title="|">&nbsp;';
  4. document.getElementById('text_edit').appendChild(sep);
  5.  
  6. var flash = document.createElement('button');
  7. flash.setAttribute('class','button2');
  8. flash.title = "Flash";
  9. flash.type = "button";
  10. flash.setAttribute('onmouseover','helpline("fl")');
  11. flash.setAttribute('onclick','selectWysiwyg(this,"flash")');
  12. flash.innerHTML = '<img alt="Flash" src="http://illiweb.com/fa/wysiwyg/page_white_flash.png" title="Flash" />';
  13. document.getElementById('text_edit').appendChild(flash);
  14.  
  15. var flashItems = document.createElement('div');
  16. flashItems.innerHTML = '<div id="flash" class="select" style="visibility: hidden; width: auto;"><p><img style="vertical-align:middle" title="Width" alt="Width" src="http://illiweb.com/fa/wysiwyg/width.png">&nbsp;<input type="text" onkeypress="if(event.keyCode==13){constructBBcode(\'flash\',new Array(\'flash_width\',\'flash_height\'),\'flash_url\');selectWysiwyg(this,\'flash\');return false}" title="Width" id="flash_width" style="width:25px" class="inputbox" autocomplete="off">&nbsp;x&nbsp;<img style="vertical-align:middle" title="Height" alt="Height" src="http://illiweb.com/fa/wysiwyg/height.png">&nbsp;<input type="text" onkeypress="if(event.keyCode==13){constructBBcode(\'flash\',new Array(\'flash_width\',\'flash_height\'),\'flash_url\');selectWysiwyg(this,\'flash\');return false}" title="Height" id="flash_height" style="width:25px" class="inputbox" autocomplete="off">&nbsp; px</p><p><img style="vertical-align:middle" title="URL" alt="URL" src="http://illiweb.com/fa/wysiwyg/link.png">&nbsp;<input type="text" onkeypress="if(event.keyCode==13){constructBBcode(\'flash\',new Array(\'flash_width\',\'flash_height\'),\'flash_url\');selectWysiwyg(this,\'flash\');return false}" title="URL" id="flash_url" style="width:150px" class="inputbox" autocomplete="off"></p><p style="text-align:center"><input type="button" value="Ok" onclick="constructBBcode(\'flash\',new Array(\'flash_width\',\'flash_height\'),\'flash_url\');selectWysiwyg(this,\'flash\')" class="button2"></p></div>';
  17. document.getElementById('text_editor_select_controls').appendChild(flashItems);
  18. });
RAW Paste Data
Top