beef-admin_area 0.3.4 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/admin/users_controller.rb +16 -1
- data/app/views/admin/users/index.html.erb +27 -2
- data/beef-admin_area.gemspec +77 -6
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/langs/en.js +170 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/editor_plugin.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/editor_plugin_src.js +952 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pastetext.js +36 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/js/pasteword.js +51 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/langs/en_dlg.js +5 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pastetext.htm +2 -8
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/paste/pasteword.htm +2 -8
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/css/template.css +23 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/editor_plugin.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/js/template.js +106 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/langs/en_dlg.js +15 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/template/template.htm +2 -9
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/about.htm +54 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/anchor.htm +2 -7
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/charmap.htm +52 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/color_picker.htm +1 -3
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/editor_template.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/editor_template_src.js +1217 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/image.htm +80 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/about.js +72 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/anchor.js +37 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/color_picker.js +253 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/image.js +245 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/js/link.js +156 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en.js +62 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/langs/en_dlg.js +51 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/link.htm +2 -7
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/content.css +36 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/dialog.css +117 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/default/ui.css +213 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/content.css +36 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/dialog.css +116 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/themes/advanced/source_editor.htm +4 -10
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce.js +1 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/tiny_mce_popup.js +5 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/editable_selects.js +70 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/form_utils.js +200 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/mctabs.js +77 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce/utils/validate.js +220 -1
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/langs/en.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/skins/clearlooks2/window.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/inlinepopups/template.htm +387 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/js/pastetext.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/js/pasteword.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/langs/en_dlg.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/pastetext.htm +33 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/paste/pasteword.htm +27 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/{tiny_mce → tiny_mce.old}/plugins/safari/blank.htm +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/{tiny_mce → tiny_mce.old}/plugins/safari/editor_plugin.js +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/blank.htm +12 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/css/template.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/editor_plugin.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/js/template.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/langs/en_dlg.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/plugins/template/template.htm +38 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/anchor.htm +31 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/color_picker.htm +75 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/editor_template.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/img/colorpicker.jpg +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/img/icons.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/anchor.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/color_picker.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/link.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/js/source_editor.js +62 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/langs/en.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/langs/en_dlg.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/link.htm +63 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/content.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/dialog.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/buttons.png +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/items.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/progress.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/skins/default/ui.css +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/themes/advanced/source_editor.htm +31 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/tiny_mce.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/tiny_mce_popup.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/utils/form_utils.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/utils/mctabs.js +1 -0
- data/generators/admin_area_files/templates/public/javascripts/admin/tiny_mce.old/utils/validate.js +1 -0
- metadata +78 -7
@@ -1 +1,90 @@
|
|
1
|
-
|
1
|
+
/* Clearlooks 2 */
|
2
|
+
|
3
|
+
/* Reset */
|
4
|
+
.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
|
5
|
+
|
6
|
+
/* General */
|
7
|
+
.clearlooks2 {position:absolute; direction:ltr}
|
8
|
+
.clearlooks2 .mceWrapper {position:static}
|
9
|
+
.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
|
10
|
+
.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
|
11
|
+
.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
|
12
|
+
|
13
|
+
/* Top */
|
14
|
+
.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
|
15
|
+
.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
|
16
|
+
.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
|
17
|
+
.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
|
18
|
+
.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
|
19
|
+
.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
|
20
|
+
.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
|
21
|
+
.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
|
22
|
+
.clearlooks2 .mceFocus .mceTop span {color:#FFF}
|
23
|
+
|
24
|
+
/* Middle */
|
25
|
+
.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
|
26
|
+
.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
|
27
|
+
.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
|
28
|
+
.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
|
29
|
+
.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
|
30
|
+
|
31
|
+
/* Bottom */
|
32
|
+
.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
|
33
|
+
.clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
|
34
|
+
.clearlooks2 .mceBottom div {top:0}
|
35
|
+
.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
|
36
|
+
.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
|
37
|
+
.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
|
38
|
+
.clearlooks2 .mceBottom span {display:none}
|
39
|
+
.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
|
40
|
+
.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
|
41
|
+
.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
|
42
|
+
.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
|
43
|
+
.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
|
44
|
+
|
45
|
+
/* Actions */
|
46
|
+
.clearlooks2 a {width:29px; height:16px; top:3px;}
|
47
|
+
.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
|
48
|
+
.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
|
49
|
+
.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
|
50
|
+
.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
|
51
|
+
.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
|
52
|
+
.clearlooks2 .mceMovable .mceMove {display:block}
|
53
|
+
.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
|
54
|
+
.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
|
55
|
+
.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
|
56
|
+
.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
|
57
|
+
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
58
|
+
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
59
|
+
.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
|
60
|
+
.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
|
61
|
+
.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
|
62
|
+
|
63
|
+
/* Resize */
|
64
|
+
.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
|
65
|
+
.clearlooks2 .mceResizable .mceResize {display:block}
|
66
|
+
.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
|
67
|
+
.clearlooks2 .mceMinimizable .mceMin {display:block}
|
68
|
+
.clearlooks2 .mceMaximizable .mceMax {display:block}
|
69
|
+
.clearlooks2 .mceMaximized .mceMed {display:block}
|
70
|
+
.clearlooks2 .mceMaximized .mceMax {display:none}
|
71
|
+
.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
|
72
|
+
.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
|
73
|
+
.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
|
74
|
+
.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
|
75
|
+
.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
|
76
|
+
.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
|
77
|
+
.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
|
78
|
+
.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
|
79
|
+
|
80
|
+
/* Alert/Confirm */
|
81
|
+
.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
|
82
|
+
.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
|
83
|
+
.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
|
84
|
+
.clearlooks2 a:hover {font-weight:bold;}
|
85
|
+
.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
|
86
|
+
.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
|
87
|
+
.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
|
88
|
+
.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
|
89
|
+
.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
|
90
|
+
.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
|
@@ -1 +1 @@
|
|
1
|
-
(function(){var b=tinymce.each;tinymce.create("tinymce.plugins.PastePlugin",{init:function(l,k){var j=this,a;j.editor=l;j.url=k;j.onPreProcess=new tinymce.util.Dispatcher(j);j.onPostProcess=new tinymce.util.Dispatcher(j);j.onPreProcess.add(j._preProcess);j.onPostProcess.add(j._postProcess);j.onPreProcess.add(function(d,c){l.execCallback("paste_preprocess",d,c)});j.onPostProcess.add(function(d,c){l.execCallback("paste_postprocess",d,c)});function h(c){var d=l.dom;j.onPreProcess.dispatch(j,c);c.node=d.create("div",0,c.content);j.onPostProcess.dispatch(j,c);c.content=l.serializer.serialize(c.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(c.content)){j._insertBlockContent(l,d,c.content)}else{j._insert(c.content)}}l.addCommand("mceInsertClipboardContent",function(d,c){h(c)});function i(d){var q,e,g,f=l.selection,r=l.dom,n=l.getBody(),c;if(r.get("_mcePaste")){return}q=r.add(n,"div",{id:"_mcePaste"},"\uFEFF");if(n!=l.getDoc().body){c=r.getPos(l.selection.getStart(),n).y}else{c=n.scrollTop}r.setStyles(q,{position:"absolute",left:-10000,top:c,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){g=r.doc.body.createTextRange();g.moveToElementText(q);g.execCommand("Paste");r.remove(q);if(q.innerHTML==="\uFEFF"){l.execCommand("mcePasteWord");d.preventDefault();return}h({content:q.innerHTML});return tinymce.dom.Event.cancel(d)}else{e=l.selection.getRng();q=q.firstChild;g=l.getDoc().createRange();g.setStart(q,0);g.setEnd(q,1);f.setRng(g);window.setTimeout(function(){var m="",o=r.select("div[id=_mcePaste]");b(o,function(p){m+=(r.select("> span.Apple-style-span div",p)[0]||r.select("> span.Apple-style-span",p)[0]||p).innerHTML});b(o,function(p){r.remove(p)});if(e){f.setRng(e)}h({content:m})},0)}}if(l.getParam("paste_auto_cleanup_on_paste",true)){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){l.onKeyDown.add(function(d,c){if(((tinymce.isMac?c.metaKey:c.ctrlKey)&&c.keyCode==86)||(c.shiftKey&&c.keyCode==45)){i(c)}})}else{l.onPaste.addToTop(function(d,c){return i(c)})}}if(l.getParam("paste_block_drop")){l.onInit.add(function(){l.dom.bind(l.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(c){c.preventDefault();c.stopPropagation();return false})})}j._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(m,h){var a=this.editor,n=h.content,j,k;function j(c){b(c,function(d){if(d.constructor==RegExp){n=n.replace(d,"")}else{n=n.replace(d[0],d[1])}})}if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(n)||h.wordContent){h.wordContent=true;j([/^\s*( )+/g,/( |<br[^>]*>)+\s*$/g]);if(a.getParam("paste_convert_middot_lists",true)){j([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<span[^>]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}j([/<!--[\s\S]+?-->/gi,/<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi,/<\\?\?xml[^>]*>/gi,/<\/?o:[^>]*>/gi,/ (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi,/ (id|name|language|type|on\w+|v:\w+)=(\w+)/gi,[/<(\/?)s>/gi,"<$1strike>"],/<script[^>]+>[\s\S]*?<\/script>/gi,[/ /g,"\u00a0"]]);if(!a.getParam("paste_retain_style_properties")){j([/<\/?(span)[^>]*>/gi])}}k=a.getParam("paste_strip_class_attributes");if(k!="none"){function l(c,f){var d,e="";if(k=="all"){return""}f=tinymce.explode(f," ");for(d=f.length-1;d>=0;d--){if(!/^(Mso)/i.test(f[d])){e+=(!e?"":" ")+f[d]}}return' class="'+e+'"'}j([[/ class=\"([^\"]*)\"/gi,l],[/ class=(\w+)/gi,l]])}if(a.getParam("paste_remove_spans")){j([/<\/?(span)[^>]*>/gi])}h.content=n},_postProcess:function(j,h){var k=this,l=k.editor,i=l.dom,a;if(h.wordContent){b(i.select("a",h.node),function(c){if(!c.href||c.href.indexOf("#_Toc")!=-1){i.remove(c,1)}});if(k.editor.getParam("paste_convert_middot_lists",true)){k._convertLists(j,h)}a=l.getParam("paste_retain_style_properties");if(tinymce.is(a,"string")){a=tinymce.explode(a)}b(i.select("*",h.node),function(d){var c={},f=0,e,o,g;if(a){for(e=0;e<a.length;e++){o=a[e];g=i.getStyle(d,o);if(g){c[o]=g;f++}}}i.setAttrib(d,"style","");if(a&&f>0){i.setStyles(d,c)}else{if(d.nodeName=="SPAN"&&!d.className){i.remove(d,true)}}})}if(l.getParam("paste_remove_styles")||(l.getParam("paste_remove_styles_if_webkit")&&tinymce.isWebKit)){b(i.select("*[style]",h.node),function(c){c.removeAttribute("style");c.removeAttribute("mce_style")})}else{if(tinymce.isWebKit){b(i.select("*",h.node),function(c){c.removeAttribute("mce_style")})}}},_convertLists:function(q,s){var o=q.editor.dom,p,l,t=-1,r,a=[],m,n;b(o.select("p",s.node),function(f){var i,e="",g,h,d,c;for(i=f.firstChild;i&&i.nodeType==3;i=i.nextSibling){e+=i.nodeValue}e=f.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(e)){g="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(e)){g="ol"}if(g){r=parseFloat(f.style.marginLeft||0);if(r>t){a.push(r)}if(!p||g!=m){p=o.create(g);o.insertAfter(p,f)}else{if(r>t){p=l.appendChild(o.create(g))}else{if(r<t){d=tinymce.inArray(a,r);c=o.getParents(p.parentNode,g);p=c[c.length-1-d]||p}}}b(o.select("span",f),function(j){var k=j.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(g=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(k)){o.remove(j)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(k)){o.remove(j)}}});h=f.innerHTML;if(g=="ul"){h=f.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{h=f.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=p.appendChild(o.create("li",0,h));o.remove(f);t=r;m=g}else{p=t=0}});n=s.node.innerHTML;if(n.indexOf("__MCE_ITEM__")!=-1){s.node.innerHTML=n.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(r,u,q){var w,s,v=r.selection,a,p,x,o,t;function n(c){var d;if(tinymce.isIE){d=r.getDoc().body.createTextRange();d.moveToElementText(c);d.collapse(false);d.select()}else{v.select(c,1);v.collapse(false)}}this._insert('<span id="_marker"> </span>',1);s=u.get("_marker");w=u.getParent(s,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(w&&!/TD|TH/.test(w.nodeName)){s=u.split(w,s);b(u.create("div",0,q).childNodes,function(c){a=s.parentNode.insertBefore(c.cloneNode(true),s)});n(a)}else{u.setOuterHTML(s,q);v.select(r.getBody(),1);v.collapse(0)}u.remove("_marker");p=v.getStart();x=u.getViewPort(r.getWin());o=r.dom.getPos(p).y;t=p.clientHeight;if(o<x.y||o+t>x.y+x.h){r.getDoc().body.scrollTop=o<x.y?o:o-x.h+25}},_insert:function(e,a){var f=this.editor;if(!f.selection.isCollapsed()){f.getDoc().execCommand("Delete",false,null)}f.execCommand(tinymce.isGecko?"insertHTML":"mceInsertContent",false,e,{skip_undo:a})},_legacySupport:function(){var d=this,a=d.editor;b(["mcePasteText","mcePasteWord"],function(c){a.addCommand(c,function(){a.windowManager.open({file:d.url+(c=="mcePasteText"?"/pastetext.htm":"/pasteword.htm"),width:parseInt(a.getParam("paste_dialog_width","450")),height:parseInt(a.getParam("paste_dialog_height","400")),inline:1})})});a.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});a.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"});a.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
|
1
|
+
(function(){var c=tinymce.each,d=null,a={paste_auto_cleanup_on_paste:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_notifyalways:false,paste_text_linebreaktype:"p",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(e,f){return e.getParam(f,a[f])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(e,f){var g=this;g.editor=e;g.url=f;g.onPreProcess=new tinymce.util.Dispatcher(g);g.onPostProcess=new tinymce.util.Dispatcher(g);g.onPreProcess.add(g._preProcess);g.onPostProcess.add(g._postProcess);g.onPreProcess.add(function(j,k){e.execCallback("paste_preprocess",j,k)});g.onPostProcess.add(function(j,k){e.execCallback("paste_postprocess",j,k)});e.pasteAsPlainText=false;function i(l,j){var k=e.dom;g.onPreProcess.dispatch(g,l);l.node=k.create("div",0,l.content);g.onPostProcess.dispatch(g,l);l.content=e.serializer.serialize(l.node,{getInner:1});if((!j)&&(e.pasteAsPlainText)){g._insertPlainText(e,k,l.content);if(!b(e,"paste_text_sticky")){e.pasteAsPlainText=false;e.controlManager.setActive("pastetext",false)}}else{if(/<(p|h[1-6]|ul|ol)/.test(l.content)){g._insertBlockContent(e,k,l.content)}else{g._insert(l.content)}}}e.addCommand("mceInsertClipboardContent",function(j,k){i(k,true)});if(!b(e,"paste_text_use_dialog")){e.addCommand("mcePasteText",function(k,j){var l=tinymce.util.Cookie;e.pasteAsPlainText=!e.pasteAsPlainText;e.controlManager.setActive("pastetext",e.pasteAsPlainText);if((e.pasteAsPlainText)&&(!l.get("tinymcePasteText"))){if(b(e,"paste_text_sticky")){e.windowManager.alert(e.translate("paste.plaintext_mode_sticky"))}else{e.windowManager.alert(e.translate("paste.plaintext_mode_sticky"))}if(!b(e,"paste_text_notifyalways")){l.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}e.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});e.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function h(s){var m,q,k,l=e.selection,p=e.dom,r=e.getBody(),j;if(e.pasteAsPlainText&&(s.clipboardData||p.doc.dataTransfer)){s.preventDefault();i({content:(s.clipboardData||p.doc.dataTransfer).getData("Text")},true);return}if(p.get("_mcePaste")){return}m=p.add(r,"div",{id:"_mcePaste","class":"mcePaste"},'\uFEFF<br _mce_bogus="1">');if(r!=e.getDoc().body){j=p.getPos(e.selection.getStart(),r).y}else{j=r.scrollTop}p.setStyles(m,{position:"absolute",left:-10000,top:j,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){k=p.doc.body.createTextRange();k.moveToElementText(m);k.execCommand("Paste");p.remove(m);if(m.innerHTML==="\uFEFF"){e.execCommand("mcePasteWord");s.preventDefault();return}i({content:m.innerHTML});return tinymce.dom.Event.cancel(s)}else{function o(n){n.preventDefault()}p.bind(e.getDoc(),"mousedown",o);p.bind(e.getDoc(),"keydown",o);q=e.selection.getRng();m=m.firstChild;k=e.getDoc().createRange();k.setStart(m,0);k.setEnd(m,1);l.setRng(k);window.setTimeout(function(){var t="",n=p.select("div.mcePaste");c(n,function(v){var u=v.firstChild;if(u&&u.nodeName=="DIV"&&u.style.marginTop&&u.style.backgroundColor){p.remove(u,1)}c(p.select("div.mcePaste",v),function(w){p.remove(w,1)});c(p.select("span.Apple-style-span",v),function(w){p.remove(w,1)});c(p.select("br[_mce_bogus]",v),function(w){p.remove(w)});t+=v.innerHTML});c(n,function(u){p.remove(u)});if(q){l.setRng(q)}i({content:t});p.unbind(e.getDoc(),"mousedown",o);p.unbind(e.getDoc(),"keydown",o)},0)}}if(b(e,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){e.onKeyDown.add(function(j,k){if(((tinymce.isMac?k.metaKey:k.ctrlKey)&&k.keyCode==86)||(k.shiftKey&&k.keyCode==45)){h(k)}})}else{e.onPaste.addToTop(function(j,k){return h(k)})}}if(b(e,"paste_block_drop")){e.onInit.add(function(){e.dom.bind(e.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(j){j.preventDefault();j.stopPropagation();return false})})}g._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(i,f){var l=this.editor,k=f.content,q=tinymce.grep,p=tinymce.explode,g=tinymce.trim,m,j;function e(h){c(h,function(o){if(o.constructor==RegExp){k=k.replace(o,"")}else{k=k.replace(o[0],o[1])}})}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(k)||f.wordContent){f.wordContent=true;e([/^\s*( )+/gi,/( |<br[^>]*>)+\s*$/gi]);if(b(l,"paste_convert_headers_to_strong")){k=k.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(l,"paste_convert_middot_lists")){e([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"]])}e([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{m=k.length;k=k.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(m!=k.length);if(b(l,"paste_retain_style_properties").replace(/^none$/i,"").length==0){k=k.replace(/<\/?span[^>]*>/gi,"")}else{e([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(u,h,t){var v=[],o=0,r=p(g(t).replace(/"/gi,"'"),";");c(r,function(s){var w,y,z=p(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":v[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":v[o++]="text-align:"+y;return;case"vert-align":v[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":v[o++]="color:"+y;return;case"mso-background":case"mso-highlight":v[o++]="background:"+y;return;case"mso-default-height":v[o++]="min-height:"+x(y);return;case"mso-default-width":v[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":v[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){v[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){v[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}v[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+v.join(";")+'"'}else{return h}}]])}}if(b(l,"paste_convert_headers_to_strong")){e([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}j=b(l,"paste_strip_class_attributes");if(j!=="none"){function n(r,o){if(j==="all"){return""}var h=q(p(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(s){return(/^(?!mso)/i.test(s))});return h.length?' class="'+h.join(" ")+'"':""}k=k.replace(/ class="([^"]+)"/gi,n);k=k.replace(/ class=(\w+)/gi,n)}if(b(l,"paste_remove_spans")){k=k.replace(/<\/?span[^>]*>/gi,"")}f.content=k},_postProcess:function(h,j){var g=this,f=g.editor,i=f.dom,e;if(j.wordContent){c(i.select("a",j.node),function(k){if(!k.href||k.href.indexOf("#_Toc")!=-1){i.remove(k,1)}});if(b(f,"paste_convert_middot_lists")){g._convertLists(h,j)}e=b(f,"paste_retain_style_properties");if((tinymce.is(e,"string"))&&(e!=="all")&&(e!=="*")){e=tinymce.explode(e.replace(/^none$/i,""));c(i.select("*",j.node),function(n){var o={},l=0,m,p,k;if(e){for(m=0;m<e.length;m++){p=e[m];k=i.getStyle(n,p);if(k){o[p]=k;l++}}}i.setAttrib(n,"style","");if(e&&l>0){i.setStyles(n,o)}else{if(n.nodeName=="SPAN"&&!n.className){i.remove(n,true)}}})}}if(b(f,"paste_remove_styles")||(b(f,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(i.select("*[style]",j.node),function(k){k.removeAttribute("style");k.removeAttribute("_mce_style")})}else{if(tinymce.isWebKit){c(i.select("*",j.node),function(k){k.removeAttribute("_mce_style")})}}},_convertLists:function(h,f){var j=h.editor.dom,i,m,e=-1,g,n=[],l,k;c(j.select("p",f.node),function(u){var r,v="",t,s,o,q;for(r=u.firstChild;r&&r.nodeType==3;r=r.nextSibling){v+=r.nodeValue}v=u.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(v)){t="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(v)){t="ol"}if(t){g=parseFloat(u.style.marginLeft||0);if(g>e){n.push(g)}if(!i||t!=l){i=j.create(t);j.insertAfter(i,u)}else{if(g>e){i=m.appendChild(j.create(t))}else{if(g<e){o=tinymce.inArray(n,g);q=j.getParents(i.parentNode,t);i=q[q.length-1-o]||i}}}c(j.select("span",u),function(w){var p=w.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(t=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){j.remove(w)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){j.remove(w)}}});s=u.innerHTML;if(t=="ul"){s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}m=i.appendChild(j.create("li",0,s));j.remove(u);e=g;l=t}else{i=e=0}});k=f.node.innerHTML;if(k.indexOf("__MCE_ITEM__")!=-1){f.node.innerHTML=k.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(l,h,m){var f,j,g=l.selection,q,n,e,o,i,k="mce_marker";function p(t){var s;if(tinymce.isIE){s=l.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(false);s.select()}else{g.select(t,1);g.collapse(false)}}this._insert('<span id="'+k+'"></span>',1);j=h.get(k);f=h.getParent(j,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(f&&!/TD|TH/.test(f.nodeName)){j=h.split(f,j);c(h.create("div",0,m).childNodes,function(r){q=j.parentNode.insertBefore(r.cloneNode(true),j)});p(q)}else{h.setOuterHTML(j,m);g.select(l.getBody(),1);g.collapse(0)}while(n=h.get(k)){h.remove(n)}n=g.getStart();e=h.getViewPort(l.getWin());o=l.dom.getPos(n).y;i=n.clientHeight;if(o<e.y||o+i>e.y+e.h){l.getDoc().body.scrollTop=o<e.y?o:o-e.h+25}},_insert:function(g,e){var f=this.editor,i=f.selection.getRng();if(!f.selection.isCollapsed()&&i.startContainer!=i.endContainer){f.getDoc().execCommand("Delete",false,null)}f.execCommand(tinymce.isGecko?"insertHTML":"mceInsertContent",false,g,{skip_undo:e})},_insertPlainText:function(j,x,v){var t,u,l,k,r,e,p,f,n=j.getWin(),z=j.getDoc(),s=j.selection,m=tinymce.is,y=tinymce.inArray,g=b(j,"paste_text_linebreaktype"),o=b(j,"paste_text_replacements");function q(h){c(h,function(i){if(i.constructor==RegExp){v=v.replace(i,"")}else{v=v.replace(i[0],i[1])}})}if((typeof(v)==="string")&&(v.length>0)){if(!d){d=("34,quot,38,amp,39,apos,60,lt,62,gt,"+j.serializer.settings.entities).split(",")}if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/&(#\d+|[a-z0-9]{1,10});/gi,function(i,h){if(h.charAt(0)==="#"){return String.fromCharCode(h.slice(1))}else{return((i=y(d,h))>0)?String.fromCharCode(d[i-1]):" "}}],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.encode(v);if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"<br />"]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"</p><p>"],[/\n/g,"<br />"]])}}if((l=v.indexOf("</p><p>"))!=-1){k=v.lastIndexOf("</p><p>");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t<u;t++){p+="</"+e[t].nodeName.toLowerCase()+">";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+'<span id="_plain_text_marker"> </span>');window.setTimeout(function(){var h=x.get("_plain_text_marker"),B,i,A,w;s.select(h,false);z.execCommand("Delete",false,null);h=null;B=s.getStart();i=x.getViewPort(n);A=x.getPos(B).y;w=B.clientHeight;if((A<i.y)||(A+w>i.y+i.h)){z.body.scrollTop=A<i.y?A:A-i.h+25}},0)}},_legacySupport:function(){var f=this,e=f.editor;e.addCommand("mcePasteWord",function(){e.windowManager.open({file:f.url+"/pasteword.htm",width:parseInt(b(e,"paste_dialog_width")),height:parseInt(b(e,"paste_dialog_height")),inline:1})});if(b(e,"paste_text_use_dialog")){e.addCommand("mcePasteText",function(){e.windowManager.open({file:f.url+"/pastetext.htm",width:parseInt(b(e,"paste_dialog_width")),height:parseInt(b(e,"paste_dialog_height")),inline:1})})}e.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
|