1 tinyMCEPopup.requireLangPack();
\r
3 var PasteTextDialog = {
\r
8 insert : function() {
\r
9 var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
\r
11 // Convert linebreaks into paragraphs
\r
12 if (document.getElementById('linebreaks').checked) {
\r
13 lines = h.split(/\r?\n/);
\r
14 if (lines.length > 1) {
\r
16 tinymce.each(lines, function(row) {
\r
17 h += '<p>' + row + '</p>';
\r
22 tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
\r
23 tinyMCEPopup.close();
\r
26 resize : function() {
\r
27 var vp = tinyMCEPopup.dom.getViewPort(window), el;
\r
29 el = document.getElementById('content');
\r
31 el.style.width = (vp.w - 20) + 'px';
\r
32 el.style.height = (vp.h - 90) + 'px';
\r
36 tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
\r