Mercurial > public > sg101
annotate media/js/tiny_mce/plugins/paste/js/pastetext.js @ 116:19b64e8f02a2
Fix typo introduced in last commit.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 23 Oct 2009 03:08:40 +0000 |
parents | a5b4c5ce0658 |
children | 149c3567fec1 |
rev | line source |
---|---|
bgneal@45 | 1 tinyMCEPopup.requireLangPack(); |
bgneal@45 | 2 |
bgneal@45 | 3 function saveContent() { |
bgneal@45 | 4 if (document.forms[0].htmlSource.value == '') { |
bgneal@45 | 5 tinyMCEPopup.close(); |
bgneal@45 | 6 return false; |
bgneal@45 | 7 } |
bgneal@45 | 8 |
bgneal@45 | 9 tinyMCEPopup.execCommand('mcePasteText', false, { |
bgneal@45 | 10 html : document.forms[0].htmlSource.value, |
bgneal@45 | 11 linebreaks : document.forms[0].linebreaks.checked |
bgneal@45 | 12 }); |
bgneal@45 | 13 |
bgneal@45 | 14 tinyMCEPopup.close(); |
bgneal@45 | 15 } |
bgneal@45 | 16 |
bgneal@45 | 17 function onLoadInit() { |
bgneal@45 | 18 tinyMCEPopup.resizeToInnerSize(); |
bgneal@45 | 19 |
bgneal@45 | 20 // Remove Gecko spellchecking |
bgneal@45 | 21 if (tinymce.isGecko) |
bgneal@45 | 22 document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); |
bgneal@45 | 23 |
bgneal@45 | 24 resizeInputs(); |
bgneal@45 | 25 } |
bgneal@45 | 26 |
bgneal@45 | 27 var wHeight=0, wWidth=0, owHeight=0, owWidth=0; |
bgneal@45 | 28 |
bgneal@45 | 29 function resizeInputs() { |
bgneal@45 | 30 if (!tinymce.isIE) { |
bgneal@45 | 31 wHeight = self.innerHeight-80; |
bgneal@45 | 32 wWidth = self.innerWidth-17; |
bgneal@45 | 33 } else { |
bgneal@45 | 34 wHeight = document.body.clientHeight-80; |
bgneal@45 | 35 wWidth = document.body.clientWidth-17; |
bgneal@45 | 36 } |
bgneal@45 | 37 |
bgneal@45 | 38 document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; |
bgneal@45 | 39 document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; |
bgneal@45 | 40 } |
bgneal@45 | 41 |
bgneal@45 | 42 tinyMCEPopup.onInit.add(onLoadInit); |