| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,36 +0,0 @@ |
| 1 |
-tinyMCEPopup.requireLangPack(); |
|
| 2 |
- |
|
| 3 |
-var PasteTextDialog = {
|
|
| 4 |
- init : function() {
|
|
| 5 |
- this.resize(); |
|
| 6 |
- }, |
|
| 7 |
- |
|
| 8 |
- insert : function() {
|
|
| 9 |
- var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
|
|
| 10 |
- |
|
| 11 |
- // Convert linebreaks into paragraphs |
|
| 12 |
- if (document.getElementById('linebreaks').checked) {
|
|
| 13 |
- lines = h.split(/\r?\n/); |
|
| 14 |
- if (lines.length > 1) {
|
|
| 15 |
- h = ''; |
|
| 16 |
- tinymce.each(lines, function(row) {
|
|
| 17 |
- h += '<p>' + row + '</p>'; |
|
| 18 |
- }); |
|
| 19 |
- } |
|
| 20 |
- } |
|
| 21 |
- |
|
| 22 |
- tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
|
|
| 23 |
- tinyMCEPopup.close(); |
|
| 24 |
- }, |
|
| 25 |
- |
|
| 26 |
- resize : function() {
|
|
| 27 |
- var vp = tinyMCEPopup.dom.getViewPort(window), el; |
|
| 28 |
- |
|
| 29 |
- el = document.getElementById('content');
|
|
| 30 |
- |
|
| 31 |
- el.style.width = (vp.w - 20) + 'px'; |
|
| 32 |
- el.style.height = (vp.h - 90) + 'px'; |
|
| 33 |
- } |
|
| 34 |
-}; |
|
| 35 |
- |
|
| 36 |
-tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); |
| ... | ... |
@@ -1,42 +1,36 @@ |
| 1 |
-tinyMCEPopup.requireLangPack(); |
|
| 2 |
- |
|
| 3 |
-function 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 |
- |
|
| 17 |
-function 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 |
- |
|
| 27 |
-var wHeight=0, wWidth=0, owHeight=0, owWidth=0; |
|
| 28 |
- |
|
| 29 |
-function 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 |
- |
|
| 42 |
-tinyMCEPopup.onInit.add(onLoadInit); |
|
| 43 | 1 |
\ No newline at end of file |
| 2 |
+tinyMCEPopup.requireLangPack(); |
|
| 3 |
+ |
|
| 4 |
+var PasteTextDialog = {
|
|
| 5 |
+ init : function() {
|
|
| 6 |
+ this.resize(); |
|
| 7 |
+ }, |
|
| 8 |
+ |
|
| 9 |
+ insert : function() {
|
|
| 10 |
+ var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
|
|
| 11 |
+ |
|
| 12 |
+ // Convert linebreaks into paragraphs |
|
| 13 |
+ if (document.getElementById('linebreaks').checked) {
|
|
| 14 |
+ lines = h.split(/\r?\n/); |
|
| 15 |
+ if (lines.length > 1) {
|
|
| 16 |
+ h = ''; |
|
| 17 |
+ tinymce.each(lines, function(row) {
|
|
| 18 |
+ h += '<p>' + row + '</p>'; |
|
| 19 |
+ }); |
|
| 20 |
+ } |
|
| 21 |
+ } |
|
| 22 |
+ |
|
| 23 |
+ tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
|
|
| 24 |
+ tinyMCEPopup.close(); |
|
| 25 |
+ }, |
|
| 26 |
+ |
|
| 27 |
+ resize : function() {
|
|
| 28 |
+ var vp = tinyMCEPopup.dom.getViewPort(window), el; |
|
| 29 |
+ |
|
| 30 |
+ el = document.getElementById('content');
|
|
| 31 |
+ |
|
| 32 |
+ el.style.width = (vp.w - 20) + 'px'; |
|
| 33 |
+ el.style.height = (vp.h - 90) + 'px'; |
|
| 34 |
+ } |
|
| 35 |
+}; |
|
| 36 |
+ |
|
| 37 |
+tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,42 @@ |
| 1 |
+tinyMCEPopup.requireLangPack(); |
|
| 2 |
+ |
|
| 3 |
+function 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 |
+ |
|
| 17 |
+function 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 |
+ |
|
| 27 |
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0; |
|
| 28 |
+ |
|
| 29 |
+function 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 |
+ |
|
| 42 |
+tinyMCEPopup.onInit.add(onLoadInit); |
|
| 0 | 43 |
\ No newline at end of file |