summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
committerhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
commitf61b5b0597e0c25f084ee67d402f12a43a7a9947 (patch)
tree3b4c3f9f38637f1a7ecf703ece4fd3bc4c6e2934 /public/javascripts/tiny_mce/plugins/paste/js/pastetext.js
parent3d3b786cc43266f6292f5edd25733dbb9bd6ed06 (diff)
added tinymce editor for body area of pages
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/paste/js/pastetext.js')
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/paste/js/pastetext.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js b/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js
new file mode 100755
index 0000000..326bb16
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js
@@ -0,0 +1,42 @@
1tinyMCEPopup.requireLangPack();
2
3function saveContent() {
4 if (document.forms[0].htmlSource.value == '') {
5 tinyMCEPopup.close();
6 return false;
7 }
8
9 tinyMCEPopup.execCommand('mcePasteText', false, {
10 html : document.forms[0].htmlSource.value,
11 linebreaks : document.forms[0].linebreaks.checked
12 });
13
14 tinyMCEPopup.close();
15}
16
17function onLoadInit() {
18 tinyMCEPopup.resizeToInnerSize();
19
20 // Remove Gecko spellchecking
21 if (tinymce.isGecko)
22 document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");
23
24 resizeInputs();
25}
26
27var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
28
29function resizeInputs() {
30 if (!tinymce.isIE) {
31 wHeight = self.innerHeight-80;
32 wWidth = self.innerWidth-17;
33 } else {
34 wHeight = document.body.clientHeight-80;
35 wWidth = document.body.clientWidth-17;
36 }
37
38 document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
39 document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
40}
41
42tinyMCEPopup.onInit.add(onLoadInit); \ No newline at end of file