tiny_mce 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG_PLUGIN.rdoc +4 -0
- data/CHANGELOG_TINYMCE +78 -7
- data/LICENSE +2 -2
- data/README.rdoc +36 -14
- data/Rakefile +1 -3
- data/SPELLCHECKING_PLUGIN.rdoc +3 -1
- data/VERSION +1 -1
- data/lib/tiny_mce.rb +2 -7
- data/lib/tiny_mce/assets/tiny_mce/langs/ar.js +95 -95
- data/lib/tiny_mce/assets/tiny_mce/langs/cs.js +13 -13
- data/lib/tiny_mce/assets/tiny_mce/langs/es.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/langs/fa.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/langs/fr.js +41 -41
- data/lib/tiny_mce/assets/tiny_mce/langs/he.js +93 -93
- data/lib/tiny_mce/assets/tiny_mce/langs/hu.js +10 -10
- data/lib/tiny_mce/assets/tiny_mce/langs/hy.js +157 -0
- data/lib/tiny_mce/assets/tiny_mce/langs/id.js +71 -71
- data/lib/tiny_mce/assets/tiny_mce/langs/ii.js +78 -70
- data/lib/tiny_mce/assets/tiny_mce/langs/ja.js +91 -99
- data/lib/tiny_mce/assets/tiny_mce/langs/lb.js +155 -0
- data/lib/tiny_mce/assets/tiny_mce/langs/pl.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/langs/ps.js +154 -0
- data/lib/tiny_mce/assets/tiny_mce/langs/pt.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/langs/ru.js +61 -59
- data/lib/tiny_mce/assets/tiny_mce/langs/sk.js +25 -25
- data/lib/tiny_mce/assets/tiny_mce/langs/th.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/langs/tr.js +51 -51
- data/lib/tiny_mce/assets/tiny_mce/langs/tw.js +2 -0
- data/lib/tiny_mce/assets/tiny_mce/langs/uk.js +7 -7
- data/lib/tiny_mce/assets/tiny_mce/langs/vi.js +17 -17
- data/lib/tiny_mce/assets/tiny_mce/langs/zu.js +162 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/ar_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/he_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/hy_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/id_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/ii_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/ja_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/lb_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/ps_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/langs/zu_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advhr/rule.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/image.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/js/image.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/ar_dlg.js +41 -41
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/de_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/fa_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/fr_dlg.js +14 -14
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/he_dlg.js +37 -37
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/hy_dlg.js +43 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/id_dlg.js +22 -22
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/ii_dlg.js +24 -24
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/ja_dlg.js +38 -38
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/lb_dlg.js +43 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/ps_dlg.js +43 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/pt_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/ru_dlg.js +31 -31
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/sk_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/th_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/tr_dlg.js +13 -13
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/uk_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advimage/langs/zu_dlg.js +43 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/js/advlink.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/ar_dlg.js +49 -49
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/fr_dlg.js +12 -12
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/he_dlg.js +40 -40
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/hy_dlg.js +52 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/id_dlg.js +32 -32
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/ii_dlg.js +31 -31
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/ja_dlg.js +49 -49
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/lb_dlg.js +52 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/ps_dlg.js +52 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/pt_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/ru_dlg.js +38 -38
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/sk_dlg.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/th_dlg.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/tr_dlg.js +23 -23
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/uk_dlg.js +11 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/vi_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/langs/zu_dlg.js +52 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlink/link.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/autoresize/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/autosave/editor_plugin_src.js +388 -17
- data/lib/tiny_mce/assets/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/bbcode/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/contextmenu/editor_plugin_src.js +35 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/directionality/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/editor_plugin_src.js +8 -5
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/ar_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/fr_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/he_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/hy_dlg.js +20 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/id_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/ii_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/ja_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/lb_dlg.js +20 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/ps_dlg.js +20 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/ru_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/sk_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/th_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/tr_dlg.js +12 -12
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/vi_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/emotions/langs/zu_dlg.js +20 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/example/dialog.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/example/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/fullpage.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/js/fullpage.js +17 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/ar_dlg.js +78 -78
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/fr_dlg.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/he_dlg.js +40 -40
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/hy_dlg.js +85 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/ii_dlg.js +51 -51
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/ja_dlg.js +75 -75
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/lb_dlg.js +85 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/ps_dlg.js +85 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/pt_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/ru_dlg.js +54 -54
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/tr_dlg.js +42 -42
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/tw_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullpage/langs/zu_dlg.js +85 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullscreen/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/fullscreen/fullscreen.htm +0 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/iespell/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/layer/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +136 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/editor_plugin_src.js +10 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/ar_dlg.js +86 -86
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/cs_dlg.js +12 -12
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/fr_dlg.js +15 -15
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/he_dlg.js +24 -24
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/hy_dlg.js +103 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/id_dlg.js +16 -16
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/ii_dlg.js +70 -70
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/ja_dlg.js +91 -91
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/lb_dlg.js +103 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/ps_dlg.js +103 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/ru_dlg.js +88 -88
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/sk_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/tr_dlg.js +44 -44
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/uk_dlg.js +24 -24
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/langs/zu_dlg.js +103 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/media/media.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/noneditable/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/pagebreak/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/editor_plugin_src.js +509 -111
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/ar_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/fr_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/he_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/hy_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/id_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/ii_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/ja_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/lb_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/ps_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/ru_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/tr_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/langs/zu_dlg.js +5 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/pastetext.htm +2 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/paste/pasteword.htm +2 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/preview/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/print/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/save/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/editor_plugin_src.js +7 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/js/searchreplace.js +4 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/ar_dlg.js +14 -14
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/fa_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/fr_dlg.js +10 -10
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/he_dlg.js +14 -14
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/hy_dlg.js +16 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/id_dlg.js +13 -13
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/ii_dlg.js +11 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/ja_dlg.js +13 -13
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/lb_dlg.js +16 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/pl_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/ps_dlg.js +16 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/ru_dlg.js +8 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/sk_dlg.js +11 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/tr_dlg.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/langs/zu_dlg.js +16 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/searchreplace/searchreplace.htm +4 -9
- data/lib/tiny_mce/assets/tiny_mce/plugins/spellchecker/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/ar_dlg.js +61 -61
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/cs_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/fr_dlg.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/he_dlg.js +56 -56
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/hy_dlg.js +63 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/ii_dlg.js +33 -33
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/ja_dlg.js +59 -59
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/lb_dlg.js +63 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/pl_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/ps_dlg.js +63 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/ru_dlg.js +21 -21
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/sk_dlg.js +7 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/th_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/tr_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/tw_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/uk_dlg.js +19 -19
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/langs/zu_dlg.js +63 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/style/props.htm +4 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/tabfocus/editor_plugin_src.js +7 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/cell.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/editor_plugin_src.js +889 -973
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/js/cell.js +40 -23
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/js/merge_cells.js +18 -20
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/js/row.js +47 -22
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/js/table.js +17 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/ar_dlg.js +70 -70
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/fr_dlg.js +14 -14
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/he_dlg.js +56 -56
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/hy_dlg.js +74 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/id_dlg.js +25 -25
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/ii_dlg.js +54 -54
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/ja_dlg.js +67 -67
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/lb_dlg.js +74 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/ps_dlg.js +74 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/pt_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/ru_dlg.js +47 -47
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/sk_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/tr_dlg.js +25 -25
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/uk_dlg.js +22 -22
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/langs/zu_dlg.js +74 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/merge_cells.htm +3 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/row.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/table/table.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/ar_dlg.js +11 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/cs_dlg.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/es_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/fr_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/he_dlg.js +7 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/hy_dlg.js +15 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/id_dlg.js +6 -6
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/ii_dlg.js +10 -10
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/ja_dlg.js +11 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/lb_dlg.js +15 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/ps_dlg.js +15 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/ru_dlg.js +9 -9
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/tr_dlg.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/langs/zu_dlg.js +15 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/template/template.htm +2 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/visualchars/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/wordcount/editor_plugin_src.js +6 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/abbr.htm +3 -10
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/acronym.htm +3 -10
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/attributes.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/cite.htm +3 -10
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/del.htm +3 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +11 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/ins.htm +3 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/js/abbr.js +8 -5
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/js/acronym.js +7 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/js/attributes.js +7 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/js/cite.js +7 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/js/del.js +7 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/js/element_common.js +8 -8
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/js/ins.js +7 -4
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/ar_dlg.js +30 -30
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/cs_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/fr_dlg.js +6 -6
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/he_dlg.js +27 -27
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/hy_dlg.js +32 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/id_dlg.js +22 -22
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/ii_dlg.js +14 -14
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js +25 -25
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/lb_dlg.js +32 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/pl_dlg.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/ps_dlg.js +32 -0
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/ru_dlg.js +15 -15
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/sk_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/th_dlg.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/tr_dlg.js +18 -18
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/uk_dlg.js +9 -9
- data/lib/tiny_mce/assets/tiny_mce/plugins/xhtmlxtras/langs/zu_dlg.js +32 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/about.htm +1 -3
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/anchor.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/color_picker.htm +1 -3
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/editor_template.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/editor_template_src.js +166 -169
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/image.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/js/anchor.js +7 -7
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/js/charmap.js +10 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/js/image.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ar.js +59 -61
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ar_dlg.js +49 -49
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/cs.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/el.js +3 -1
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/es.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/es_dlg.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/fa_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/fr.js +14 -17
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/fr_dlg.js +17 -17
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/he.js +57 -57
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/he_dlg.js +49 -49
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/hu.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/hu_dlg.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/hy.js +62 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/hy_dlg.js +51 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/id.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/id_dlg.js +13 -13
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ii.js +42 -40
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ii_dlg.js +28 -28
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/it_dlg.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ja.js +57 -59
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ja_dlg.js +48 -48
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/lb.js +63 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/lb_dlg.js +51 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/pl.js +2 -2
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ps.js +62 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ps_dlg.js +51 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/pt.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ru.js +28 -28
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/ru_dlg.js +37 -37
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/sk.js +15 -15
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/sk_dlg.js +19 -19
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/th.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/th_dlg.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/tr.js +27 -27
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/tr_dlg.js +17 -17
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/tw.js +3 -3
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/uk_dlg.js +6 -6
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/vi.js +17 -17
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/vi_dlg.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/zu.js +64 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/langs/zu_dlg.js +51 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/link.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/skins/default/content.css +6 -3
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/skins/default/dialog.css +4 -3
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/skins/default/ui.css +4 -5
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/skins/o2k7/content.css +6 -3
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/skins/o2k7/dialog.css +3 -2
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/skins/o2k7/ui.css +3 -3
- data/lib/tiny_mce/assets/tiny_mce/themes/advanced/source_editor.htm +2 -7
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/editor_template_src.js +5 -5
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/ar.js +9 -9
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/he.js +8 -8
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/hu.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/hy.js +11 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/ii.js +8 -8
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/ja.js +9 -9
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/lb.js +11 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/ps.js +11 -0
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/ru.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/sk.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/tr.js +4 -4
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/tw.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/vi.js +9 -9
- data/lib/tiny_mce/assets/tiny_mce/themes/simple/langs/zu.js +11 -0
- data/lib/tiny_mce/assets/tiny_mce/tiny_mce.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/tiny_mce_popup.js +1 -1
- data/lib/tiny_mce/assets/tiny_mce/tiny_mce_src.js +4684 -4107
- data/lib/tiny_mce/assets/tiny_mce/utils/editable_selects.js +5 -4
- data/lib/tiny_mce/assets/tiny_mce/utils/form_utils.js +5 -4
- data/lib/tiny_mce/assets/tiny_mce/utils/mctabs.js +5 -4
- data/lib/tiny_mce/assets/tiny_mce/utils/validate.js +5 -4
- data/lib/tiny_mce/base.rb +7 -19
- data/lib/tiny_mce/configuration.rb +98 -0
- data/lib/tiny_mce/exceptions.rb +14 -0
- data/lib/tiny_mce/helpers.rb +13 -49
- data/lib/tiny_mce/spell_checker.rb +0 -2
- data/lib/tiny_mce/valid_tinymce_options.yml +1 -6
- data/test/functional/full_tiny_mce_controller_test.rb +9 -12
- data/test/functional/multi_configuration_tiny_mce_controller_test.rb +58 -0
- data/test/functional/slim_tiny_mce_controller_test.rb +8 -5
- data/test/test_helper.rb +12 -0
- data/test/unit/configuration_test.rb +56 -0
- data/test/unit/helpers/tiny_mce_helper_test.rb +99 -97
- data/test/unit/tiny_mce_test.rb +1 -2
- data/tiny_mce.gemspec +79 -10
- metadata +88 -11
- data/lib/tiny_mce/assets/tiny_mce/plugins/safari/blank.htm +0 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/safari/editor_plugin.js +0 -1
- data/lib/tiny_mce/assets/tiny_mce/plugins/safari/editor_plugin_src.js +0 -438
- data/lib/tiny_mce/option_validator.rb +0 -35
- data/test/unit/options_validator_test.rb +0 -51
@@ -1,103 +1,103 @@
|
|
1
1
|
tinyMCE.addI18n('tr.media_dlg',{
|
2
|
-
title:"T\u00FCmle\u015Fik medya ekle/d\u00FCzenle",
|
2
|
+
title:"T\u00FCmle\u015Fik medya ekle / d\u00FCzenle",
|
3
3
|
general:"Genel",
|
4
4
|
advanced:"Geli\u015Fmi\u015F",
|
5
5
|
file:"Dosya/URL",
|
6
|
-
list:"
|
6
|
+
list:"Listele",
|
7
7
|
size:"Boyutlar",
|
8
8
|
preview:"\u00D6nizleme",
|
9
|
-
constrain_proportions:"
|
9
|
+
constrain_proportions:"Oran\u0131 s\u0131n\u0131rla",
|
10
10
|
type:"Tip",
|
11
11
|
id:"Id",
|
12
12
|
name:"\u0130sim",
|
13
13
|
class_name:"S\u0131n\u0131f",
|
14
|
-
vspace:"
|
15
|
-
hspace:"
|
16
|
-
play:"
|
17
|
-
loop:"D\
|
18
|
-
menu:"Men\u00FC g\u00F6ster",
|
14
|
+
vspace:"Dikey bo\u015Fluk",
|
15
|
+
hspace:"Yatay bo\u015Fluk",
|
16
|
+
play:"Otomatik oynat",
|
17
|
+
loop:"D\u00F6nd\u00FCr",
|
18
|
+
menu:"Men\u00FCy\u00FC g\u00F6ster",
|
19
19
|
quality:"Kalite",
|
20
20
|
scale:"\u00D6l\u00E7ek",
|
21
21
|
align:"Hizala",
|
22
22
|
salign:"SHizala",
|
23
|
-
wmode:"
|
23
|
+
wmode:"WModu",
|
24
24
|
bgcolor:"Arkaplan",
|
25
25
|
base:"Taban",
|
26
|
-
flashvars:"Flash de\u011Fi\
|
26
|
+
flashvars:"Flash de\u011Fi\u015Fkeni",
|
27
27
|
liveconnect:"SWLiveConnect",
|
28
|
-
autohref:"
|
28
|
+
autohref:"AutoHREF",
|
29
29
|
cache:"\u00D6nbellek",
|
30
30
|
hidden:"Gizli",
|
31
|
-
controller:"
|
31
|
+
controller:"Kontroller",
|
32
32
|
kioskmode:"Kiosk modu",
|
33
|
-
playeveryframe:"Her \u00E7er\u00E7eveyi
|
33
|
+
playeveryframe:"Her \u00E7er\u00E7eveyi oynat",
|
34
34
|
targetcache:"Hedef \u00F6nbellek",
|
35
|
-
correction:"D\
|
36
|
-
enablejavascript:"
|
37
|
-
starttime:"Ba\u015Flang\
|
35
|
+
correction:"D\u00FCzeltme yok",
|
36
|
+
enablejavascript:"Javascript Aktif",
|
37
|
+
starttime:"Ba\u015Flang\u0131\u00E7 zaman\u0131",
|
38
38
|
endtime:"Biti\u015F zaman\u0131",
|
39
39
|
href:"Href",
|
40
|
-
qtsrcchokespeed:"
|
40
|
+
qtsrcchokespeed:"S\u0131k\u0131\u015Ft\u0131rma h\u0131z\u0131",
|
41
41
|
target:"Hedef",
|
42
42
|
volume:"Ses d\u00FCzeyi",
|
43
|
-
autostart:"
|
44
|
-
enabled:"
|
43
|
+
autostart:"Otomatik ba\u015Flat",
|
44
|
+
enabled:"Aktif",
|
45
45
|
fullscreen:"Tam ekran",
|
46
|
-
invokeurls:"\
|
46
|
+
invokeurls:"Ba\u015Flatma URL'si",
|
47
47
|
mute:"Sessiz",
|
48
48
|
stretchtofit:"S\u0131\u011Facak \u015Fekilde boyutland\u0131r",
|
49
49
|
windowlessvideo:"Penceresiz video",
|
50
|
-
balance:"
|
51
|
-
baseurl:"
|
52
|
-
captioningid:"Ba\u015Fl\
|
53
|
-
currentmarker:"\
|
54
|
-
currentposition:"\
|
50
|
+
balance:"Denge",
|
51
|
+
baseurl:"Ge\u00E7erli URL",
|
52
|
+
captioningid:"Ba\u015Fl\u0131k id",
|
53
|
+
currentmarker:"Se\u00E7ili i\u015Faret\u00E7i",
|
54
|
+
currentposition:"Se\u00E7ili konum",
|
55
55
|
defaultframe:"Varsay\u0131lan \u00E7er\u00E7eve",
|
56
|
-
playcount:"
|
56
|
+
playcount:"Oynatma say\u0131s\u0131",
|
57
57
|
rate:"Oran",
|
58
58
|
uimode:"UI Modu",
|
59
59
|
flash_options:"Flash se\u00E7enekleri",
|
60
60
|
qt_options:"Quicktime se\u00E7enekleri",
|
61
61
|
wmp_options:"Windows media player se\u00E7enekleri",
|
62
62
|
rmp_options:"Real media player se\u00E7enekleri",
|
63
|
-
shockwave_options:"
|
64
|
-
autogotourl:"
|
65
|
-
center:"
|
63
|
+
shockwave_options:"Shockware se\u00E7enekleri",
|
64
|
+
autogotourl:"URL'e otomatik git",
|
65
|
+
center:"Orta",
|
66
66
|
imagestatus:"Resim durumu",
|
67
67
|
maintainaspect:"Orant\u0131y\u0131 koru",
|
68
68
|
nojava:"Java yok",
|
69
|
-
prefetch:"\u00D6n
|
69
|
+
prefetch:"\u00D6n belle\u011Fe al",
|
70
70
|
shuffle:"Kar\u0131\u015Ft\u0131r",
|
71
71
|
console:"Konsol",
|
72
72
|
numloop:"D\u00F6ng\u00FC say\u0131s\u0131",
|
73
73
|
controls:"Kontroller",
|
74
|
-
scriptcallbacks:"Script \u00E7a\
|
74
|
+
scriptcallbacks:"Script \u00E7a\u011F\u0131r",
|
75
75
|
swstretchstyle:"Esnetme stili",
|
76
76
|
swstretchhalign:"Esnetme Y-Hiza",
|
77
77
|
swstretchvalign:"Esnetme D-Hiza",
|
78
78
|
sound:"Ses",
|
79
|
-
progress:"\
|
79
|
+
progress:"\u0130lerle",
|
80
80
|
qtsrc:"QT Kay.",
|
81
|
-
qt_stream_warn:"Ak\
|
81
|
+
qt_stream_warn:"Ak\u0131\u015F rtsp kaynaklar\u0131 geli\u015Fmi\u015F alt\u0131ndaki QT Kay. alan\u0131na girilmeli.\nKay. alan\u0131na ayr\u0131ca ak\u0131\u015Fkan olmayan eklenir.",
|
82
82
|
align_top:"\u00DCst",
|
83
|
-
align_right:"Sa\
|
84
|
-
align_bottom:"
|
85
|
-
align_left:"
|
86
|
-
align_center:"
|
87
|
-
align_top_left:"Sol \
|
83
|
+
align_right:"Sa\u011F",
|
84
|
+
align_bottom:"Bottom",
|
85
|
+
align_left:"Sol",
|
86
|
+
align_center:"Orta",
|
87
|
+
align_top_left:"Sol \u00FCst",
|
88
88
|
align_top_right:"Sa\u011F \u00FCst",
|
89
89
|
align_bottom_left:"Sol alt",
|
90
90
|
align_bottom_right:"Sa\u011F alt",
|
91
91
|
flv_options:"Flash video se\u00E7enekleri",
|
92
|
-
flv_scalemode:"
|
92
|
+
flv_scalemode:"\u00D6l\u00E7ek modu",
|
93
93
|
flv_buffer:"Tampon",
|
94
|
-
flv_startimage:"
|
94
|
+
flv_startimage:"Resmi ba\u015Flat",
|
95
95
|
flv_starttime:"Ba\u015Flang\u0131\u00E7 zaman\u0131",
|
96
96
|
flv_defaultvolume:"Varsay\u0131lan ses d\u00FCzeyi",
|
97
97
|
flv_hiddengui:"Gizli GUI",
|
98
98
|
flv_autostart:"Otomatik ba\u015Flat",
|
99
|
-
flv_loop:"D\
|
100
|
-
flv_showscalemodes:"\u00D6l\u00E7ek
|
101
|
-
flv_smoothvideo:"
|
102
|
-
flv_jscallback:"JS \
|
99
|
+
flv_loop:"D\u00F6nd\u00FCr",
|
100
|
+
flv_showscalemodes:"\u00D6l\u00E7ek modunu g\u00F6ster",
|
101
|
+
flv_smoothvideo:"D\u00FCzg\u00FCn video",
|
102
|
+
flv_jscallback:"JS \u00C7e\u011F\u0131r"
|
103
103
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
tinyMCE.addI18n('uk.media_dlg',{
|
2
|
-
title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438
|
2
|
+
title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043E\u0432\u0430\u043D\u0456 \u043C\u0435\u0434\u0456\u044F",
|
3
3
|
general:"\u0417\u0430\u0433\u0430\u043B\u044C\u043D\u0435",
|
4
4
|
advanced:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u043E",
|
5
5
|
file:"\u0424\u0430\u0439\u043B/URL",
|
@@ -17,18 +17,18 @@ play:"\u0410\u0432\u0442\u043E\u043F\u043B\u0435\u0439",
|
|
17
17
|
loop:"\u041B\u0443\u043F",
|
18
18
|
menu:"\u041F\u043E\u043A\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043C\u0435\u043D\u044E",
|
19
19
|
quality:"\u042F\u043A\u0456\u0441\u0442\u044C",
|
20
|
-
scale:"
|
21
|
-
align:"
|
22
|
-
salign:"
|
23
|
-
wmode:"
|
20
|
+
scale:"\u041C\u0430\u0441\u0448\u0442\u0430\u0431\u0443\u0432\u0430\u043D\u043D\u044F",
|
21
|
+
align:"\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F",
|
22
|
+
salign:"S-\u0412\u0438\u0440\u0456\u0432\u043D\u044E\u0432\u0430\u043D\u043D\u044F",
|
23
|
+
wmode:"W-\u0440\u0435\u0436\u0438\u043C",
|
24
24
|
bgcolor:"\u0424\u043E\u043D",
|
25
|
-
base:"
|
26
|
-
flashvars:"
|
25
|
+
base:"\u0411\u0430\u0437\u0430",
|
26
|
+
flashvars:"Flash-\u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0438",
|
27
27
|
liveconnect:"SWLiveConnect",
|
28
28
|
autohref:"AutoHREF",
|
29
29
|
cache:"\u041A\u0435\u0448",
|
30
|
-
hidden:"
|
31
|
-
controller:"
|
30
|
+
hidden:"\u041F\u0440\u0438\u0445\u043E\u0432\u0430\u043D\u0438\u0439",
|
31
|
+
controller:"\u041A\u043E\u043D\u0442\u0440\u043E\u043B\u0435\u0440",
|
32
32
|
kioskmode:"Kiosk mode",
|
33
33
|
playeveryframe:"Play every frame",
|
34
34
|
targetcache:"Target cache",
|
@@ -41,11 +41,11 @@ qtsrcchokespeed:"Choke speed",
|
|
41
41
|
target:"Target",
|
42
42
|
volume:"\u0413\u0443\u0447\u043D\u0456\u0441\u0442\u044C",
|
43
43
|
autostart:"\u0410\u0432\u0442\u043E\u0441\u0442\u0430\u0440\u0442",
|
44
|
-
enabled:"
|
45
|
-
fullscreen:"
|
46
|
-
invokeurls:"
|
47
|
-
mute:"
|
48
|
-
stretchtofit:"
|
44
|
+
enabled:"\u0414\u043E\u0437\u0432\u043E\u043B\u0435\u043D\u0438\u0439",
|
45
|
+
fullscreen:"\u041F\u043E\u0432\u043D\u0438\u0439 \u0435\u043A\u0440\u0430\u043D",
|
46
|
+
invokeurls:"\u0412\u0438\u043A\u043B\u0438\u043A\u0430\u0442\u0438 URLs",
|
47
|
+
mute:"\u0417\u0430\u0433\u043B\u0443\u0448\u0438\u0442\u0438",
|
48
|
+
stretchtofit:"\u0417\u043C\u0435\u043D\u0448\u0438\u0442\u0438, \u0449\u043E\u0431 \u0432\u043C\u0456\u0441\u0442\u0438\u043B\u043E\u0441\u044C",
|
49
49
|
windowlessvideo:"Windowless video",
|
50
50
|
balance:"\u0411\u0430\u043B\u0430\u043D\u0441",
|
51
51
|
baseurl:"Base URL",
|
@@ -79,18 +79,18 @@ sound:"Sound",
|
|
79
79
|
progress:"Progress",
|
80
80
|
qtsrc:"QT Src",
|
81
81
|
qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",
|
82
|
-
align_top:"
|
83
|
-
align_right:"
|
84
|
-
align_bottom:"
|
85
|
-
align_left:"
|
86
|
-
align_center:"
|
87
|
-
align_top_left:"
|
88
|
-
align_top_right:"
|
89
|
-
align_bottom_left:"
|
90
|
-
align_bottom_right:"
|
82
|
+
align_top:"\u0412\u0435\u0440\u0445",
|
83
|
+
align_right:"\u041F\u0440\u0430\u0432\u043E",
|
84
|
+
align_bottom:"\u041D\u0438\u0437",
|
85
|
+
align_left:"\u041B\u0456\u0432\u043E",
|
86
|
+
align_center:"\u0426\u0435\u043D\u0442\u0440",
|
87
|
+
align_top_left:"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043B\u0456\u0432\u0430",
|
88
|
+
align_top_right:"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043F\u0440\u0430\u0432\u0430",
|
89
|
+
align_bottom_left:"\u0417\u043D\u0438\u0437\u0443 \u0437\u043B\u0456\u0432\u0430",
|
90
|
+
align_bottom_right:"\u0417\u043D\u0438\u0437\u0443 \u0437\u043F\u0440\u0430\u0432\u0430",
|
91
91
|
flv_options:"Flash video options",
|
92
92
|
flv_scalemode:"Scale mode",
|
93
|
-
flv_buffer:"
|
93
|
+
flv_buffer:"\u0411\u0443\u0444\u0435\u0440",
|
94
94
|
flv_startimage:"Start image",
|
95
95
|
flv_starttime:"Start time",
|
96
96
|
flv_defaultvolume:"Default volumne",
|
@@ -0,0 +1,103 @@
|
|
1
|
+
tinyMCE.addI18n('zu.media_dlg',{
|
2
|
+
title:"\u63D2\u5165/\u7F16\u8F91\u5D4C\u5165\u5A92\u4F53",
|
3
|
+
general:"\u4E00\u822C",
|
4
|
+
advanced:"\u9AD8\u7EA7",
|
5
|
+
file:"\u6587\u4EF6/\u7F51\u5740",
|
6
|
+
list:"\u5217\u8868",
|
7
|
+
size:"\u5C3A\u5BF8",
|
8
|
+
preview:"\u9884\u89C8",
|
9
|
+
constrain_proportions:"\u4FDD\u6301\u6BD4\u4F8B",
|
10
|
+
type:"\u7C7B\u578B",
|
11
|
+
id:"Id",
|
12
|
+
name:"\u540D\u79F0",
|
13
|
+
class_name:"\u7C7B\u578B",
|
14
|
+
vspace:"\u6C34\u51C6\u95F4\u8DDD",
|
15
|
+
hspace:"\u5782\u76F4\u95F4\u8DDD",
|
16
|
+
play:"\u81EA\u52A8\u64AD\u653E",
|
17
|
+
loop:"\u56DE\u5708\u64AD\u653E",
|
18
|
+
menu:"\u663E\u793A\u529F\u80FD\u8868",
|
19
|
+
quality:"\u54C1\u8D28",
|
20
|
+
scale:"\u6BD4\u4F8B",
|
21
|
+
align:"\u5BF9\u9F50",
|
22
|
+
salign:"SAlign",
|
23
|
+
wmode:"\u89C6\u7A97\u6A21\u5F0F",
|
24
|
+
bgcolor:"\u80CC\u666F\u8272",
|
25
|
+
base:"\u57FA\u5E95",
|
26
|
+
flashvars:"\u53C2\u6570",
|
27
|
+
liveconnect:"SWLiveConnect",
|
28
|
+
autohref:"\u81EA\u52A8HREF",
|
29
|
+
cache:"\u7F13\u5B58",
|
30
|
+
hidden:"\u9690\u85CF",
|
31
|
+
controller:"\u63A7\u5236\u53F0",
|
32
|
+
kioskmode:"Kiosk\u6A21\u5F0F",
|
33
|
+
playeveryframe:"\u64AD\u653E\u6BCF\u4E00\u5E27",
|
34
|
+
targetcache:"\u76EE\u6807\u7F13\u5B58",
|
35
|
+
correction:"\u6CA1\u6709\u4FEE\u6B63",
|
36
|
+
enablejavascript:"\u542F\u7528JavaScript",
|
37
|
+
starttime:"\u5F00\u59CB\u65F6\u95F4",
|
38
|
+
endtime:"\u7ED3\u675F\u65F6\u95F4",
|
39
|
+
href:"\u8FDE\u7ED3",
|
40
|
+
qtsrcchokespeed:"Choke speed",
|
41
|
+
target:"\u76EE\u6807",
|
42
|
+
volume:"\u97F3\u91CF",
|
43
|
+
autostart:"\u81EA\u52A8\u5F00\u59CB",
|
44
|
+
enabled:"\u542F\u7528",
|
45
|
+
fullscreen:"\u5168\u5C4F",
|
46
|
+
invokeurls:"\u76F8\u5173URLs",
|
47
|
+
mute:"\u9759\u97F3",
|
48
|
+
stretchtofit:"\u62C9\u4F38",
|
49
|
+
windowlessvideo:"\u65E0\u8FB9\u6846",
|
50
|
+
balance:"\u5E73\u8861",
|
51
|
+
baseurl:"\u57FA\u51C6URL",
|
52
|
+
captioningid:"Captioning id",
|
53
|
+
currentmarker:"\u5F53\u524D\u6807\u8BB0",
|
54
|
+
currentposition:"\u5F53\u524D\u4F4D\u7F6E",
|
55
|
+
defaultframe:"\u9ED8\u8BA4\u5E27",
|
56
|
+
playcount:"\u64AD\u653E\u8BA1\u6570",
|
57
|
+
rate:"\u5E27\u7387",
|
58
|
+
uimode:"\u9762\u677F\u6A21\u5F0F",
|
59
|
+
flash_options:"Flash\u9009\u9879",
|
60
|
+
qt_options:"Quicktime\u9009\u9879",
|
61
|
+
wmp_options:"Windows media player\u9009\u9879",
|
62
|
+
rmp_options:"Real media player\u9009\u9879",
|
63
|
+
shockwave_options:"Shockwave\u9009\u9879",
|
64
|
+
autogotourl:"\u81EA\u52A8\u8F6C\u5230URL",
|
65
|
+
center:"\u4E2D\u5FC3",
|
66
|
+
imagestatus:"\u56FE\u50CF\u72B6\u6001",
|
67
|
+
maintainaspect:"Maintain aspect",
|
68
|
+
nojava:"No java",
|
69
|
+
prefetch:"\u9884\u8BFB\u53D6",
|
70
|
+
shuffle:"Shuffle",
|
71
|
+
console:"\u63A7\u5236\u53F0",
|
72
|
+
numloop:"\u56DE\u5708\u6B21\u6570",
|
73
|
+
controls:"\u63A7\u5236\u5668",
|
74
|
+
scriptcallbacks:"\u811A\u672C\u56DE\u6863",
|
75
|
+
swstretchstyle:"\u62C9\u5347\u6A21\u5F0F",
|
76
|
+
swstretchhalign:"\u6C34\u51C6\u62C9\u5347",
|
77
|
+
swstretchvalign:"\u5782\u76F4\u62C9\u5347",
|
78
|
+
sound:"\u58F0\u97F3",
|
79
|
+
progress:"\u8FDB\u5EA6",
|
80
|
+
qtsrc:"QT Src",
|
81
|
+
qt_stream_warn:"\u6D41\u5F0Frtsp\u8D44\u6E90\u5E94\u8BE5\u6DFB\u52A0\u5230\u201C\u9AD8\u7EA7\u201D\u4E2DQT Src\u3002\n\u540C\u65F6\u6DFB\u52A0\u975E\u6D41\u5F0F\u8D44\u6E90\u5230Src\u3002",
|
82
|
+
align_top:"\u4E0A\u65B9",
|
83
|
+
align_right:"\u9760\u53F3",
|
84
|
+
align_bottom:"\u4E0B\u65B9",
|
85
|
+
align_left:"\u9760\u5DE6",
|
86
|
+
align_center:"\u4E2D\u95F4",
|
87
|
+
align_top_left:"\u5DE6\u4E0A",
|
88
|
+
align_top_right:"\u53F3\u4E0A",
|
89
|
+
align_bottom_left:"\u5DE6\u4E0B",
|
90
|
+
align_bottom_right:"\u53F3\u4E0B",
|
91
|
+
flv_options:"Flash\u89C6\u9891\u9009\u9879",
|
92
|
+
flv_scalemode:"Scale mode",
|
93
|
+
flv_buffer:"\u7F13\u51B2",
|
94
|
+
flv_startimage:"\u5F00\u59CB\u753B\u9762",
|
95
|
+
flv_starttime:"\u5F00\u59CB\u65F6\u95F4",
|
96
|
+
flv_defaultvolume:"\u9884\u8BBE\u97F3\u91CF",
|
97
|
+
flv_hiddengui:"\u9690\u85CFGUI",
|
98
|
+
flv_autostart:"\u81EA\u52A8\u64AD\u653E",
|
99
|
+
flv_loop:"\u56DE\u5708",
|
100
|
+
flv_showscalemodes:"Show scale modes",
|
101
|
+
flv_smoothvideo:"\u5E73\u6ED1\u56FE\u50CF",
|
102
|
+
flv_jscallback:"JS\u56DE\u6863"
|
103
|
+
});
|
@@ -809,13 +809,8 @@
|
|
809
809
|
</div>
|
810
810
|
|
811
811
|
<div class="mceActionPanel">
|
812
|
-
<
|
813
|
-
|
814
|
-
</div>
|
815
|
-
|
816
|
-
<div style="float: right">
|
817
|
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
818
|
-
</div>
|
812
|
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
813
|
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
819
814
|
</div>
|
820
815
|
</form>
|
821
816
|
</body>
|
@@ -1,8 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* editor_plugin_src.js
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
6
9
|
*/
|
7
10
|
|
8
11
|
(function() {
|
@@ -1,8 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* editor_plugin_src.js
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
6
9
|
*/
|
7
10
|
|
8
11
|
(function() {
|
@@ -1,8 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* editor_plugin_src.js
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
6
9
|
*/
|
7
10
|
|
8
11
|
(function() {
|
@@ -1 +1 @@
|
|
1
|
-
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.PastePlugin",{init:function(c,d){var e=this,b;e.editor=c;e.url=d;e.onPreProcess=new tinymce.util.Dispatcher(e);e.onPostProcess=new tinymce.util.Dispatcher(e);e.onPreProcess.add(e._preProcess);e.onPostProcess.add(e._postProcess);e.onPreProcess.add(function(h,i){c.execCallback("paste_preprocess",h,i)});e.onPostProcess.add(function(h,i){c.execCallback("paste_postprocess",h,i)});function g(i){var h=c.dom;e.onPreProcess.dispatch(e,i);i.node=h.create("div",0,i.content);e.onPostProcess.dispatch(e,i);i.content=c.serializer.serialize(i.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(i.content)){e._insertBlockContent(c,h,i.content)}else{e._insert(i.content)}}c.addCommand("mceInsertClipboardContent",function(h,i){g(i)});function f(l){var p,k,i,j=c.selection,o=c.dom,h=c.getBody(),m;if(o.get("_mcePaste")){return}p=o.add(h,"div",{id:"_mcePaste"},"\uFEFF");if(h!=c.getDoc().body){m=o.getPos(c.selection.getStart(),h).y}else{m=h.scrollTop}o.setStyles(p,{position:"absolute",left:-10000,top:m,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){i=o.doc.body.createTextRange();i.moveToElementText(p);i.execCommand("Paste");o.remove(p);if(p.innerHTML==="\uFEFF"){c.execCommand("mcePasteWord");l.preventDefault();return}g({content:p.innerHTML});return tinymce.dom.Event.cancel(l)}else{k=c.selection.getRng();p=p.firstChild;i=c.getDoc().createRange();i.setStart(p,0);i.setEnd(p,1);j.setRng(i);window.setTimeout(function(){var q="",n=o.select("div[id=_mcePaste]");a(n,function(r){q+=(o.select("> span.Apple-style-span div",r)[0]||o.select("> span.Apple-style-span",r)[0]||r).innerHTML});a(n,function(r){o.remove(r)});if(k){j.setRng(k)}g({content:q})},0)}}if(c.getParam("paste_auto_cleanup_on_paste",true)){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){c.onKeyDown.add(function(h,i){if(((tinymce.isMac?i.metaKey:i.ctrlKey)&&i.keyCode==86)||(i.shiftKey&&i.keyCode==45)){f(i)}})}else{c.onPaste.addToTop(function(h,i){return f(i)})}}if(c.getParam("paste_block_drop")){c.onInit.add(function(){c.dom.bind(c.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(h){h.preventDefault();h.stopPropagation();return false})})}e._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(d,i){var b=this.editor,c=i.content,g,f;function g(h){a(h,function(j){if(j.constructor==RegExp){c=c.replace(j,"")}else{c=c.replace(j[0],j[1])}})}if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(c)||i.wordContent){i.wordContent=true;g([/^\s*( )+/g,/( |<br[^>]*>)+\s*$/g]);if(b.getParam("paste_convert_middot_lists",true)){g([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<span[^>]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}g([/<!--[\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(!b.getParam("paste_retain_style_properties")){g([/<\/?(span)[^>]*>/gi])}}f=b.getParam("paste_strip_class_attributes");if(f!="none"){function e(l,h){var k,j="";if(f=="all"){return""}h=tinymce.explode(h," ");for(k=h.length-1;k>=0;k--){if(!/^(Mso)/i.test(h[k])){j+=(!j?"":" ")+h[k]}}return' class="'+j+'"'}g([[/ class=\"([^\"]*)\"/gi,e],[/ class=(\w+)/gi,e]])}if(b.getParam("paste_remove_spans")){g([/<\/?(span)[^>]*>/gi])}i.content=c},_postProcess:function(e,g){var d=this,c=d.editor,f=c.dom,b;if(g.wordContent){a(f.select("a",g.node),function(h){if(!h.href||h.href.indexOf("#_Toc")!=-1){f.remove(h,1)}});if(d.editor.getParam("paste_convert_middot_lists",true)){d._convertLists(e,g)}b=c.getParam("paste_retain_style_properties");if(tinymce.is(b,"string")){b=tinymce.explode(b)}a(f.select("*",g.node),function(l){var m={},j=0,k,n,h;if(b){for(k=0;k<b.length;k++){n=b[k];h=f.getStyle(l,n);if(h){m[n]=h;j++}}}f.setAttrib(l,"style","");if(b&&j>0){f.setStyles(l,m)}else{if(l.nodeName=="SPAN"&&!l.className){f.remove(l,true)}}})}if(c.getParam("paste_remove_styles")||(c.getParam("paste_remove_styles_if_webkit")&&tinymce.isWebKit)){a(f.select("*[style]",g.node),function(h){h.removeAttribute("style");h.removeAttribute("mce_style")})}else{if(tinymce.isWebKit){a(f.select("*",g.node),function(h){h.removeAttribute("mce_style")})}}},_convertLists:function(e,c){var g=e.editor.dom,f,j,b=-1,d,k=[],i,h;a(g.select("p",c.node),function(r){var n,s="",q,o,l,m;for(n=r.firstChild;n&&n.nodeType==3;n=n.nextSibling){s+=n.nodeValue}s=r.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(s)){q="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(s)){q="ol"}if(q){d=parseFloat(r.style.marginLeft||0);if(d>b){k.push(d)}if(!f||q!=i){f=g.create(q);g.insertAfter(f,r)}else{if(d>b){f=j.appendChild(g.create(q))}else{if(d<b){l=tinymce.inArray(k,d);m=g.getParents(f.parentNode,q);f=m[m.length-1-l]||f}}}a(g.select("span",r),function(t){var p=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(q=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){g.remove(t)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){g.remove(t)}}});o=r.innerHTML;if(q=="ul"){o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}j=f.appendChild(g.create("li",0,o));g.remove(r);b=d;i=q}else{f=b=0}});h=c.node.innerHTML;if(h.indexOf("__MCE_ITEM__")!=-1){c.node.innerHTML=h.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(h,e,i){var c,g,d=h.selection,m,j,b,k,f;function l(p){var o;if(tinymce.isIE){o=h.getDoc().body.createTextRange();o.moveToElementText(p);o.collapse(false);o.select()}else{d.select(p,1);d.collapse(false)}}this._insert('<span id="_marker"> </span>',1);g=e.get("_marker");c=e.getParent(g,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(c&&!/TD|TH/.test(c.nodeName)){g=e.split(c,g);a(e.create("div",0,i).childNodes,function(o){m=g.parentNode.insertBefore(o.cloneNode(true),g)});l(m)}else{e.setOuterHTML(g,i);d.select(h.getBody(),1);d.collapse(0)}e.remove("_marker");j=d.getStart();b=e.getViewPort(h.getWin());k=h.dom.getPos(j).y;f=j.clientHeight;if(k<b.y||k+f>b.y+b.h){h.getDoc().body.scrollTop=k<b.y?k:k-b.h+25}},_insert:function(d,b){var c=this.editor;if(!c.selection.isCollapsed()){c.getDoc().execCommand("Delete",false,null)}c.execCommand(tinymce.isGecko?"insertHTML":"mceInsertContent",false,d,{skip_undo:b})},_legacySupport:function(){var c=this,b=c.editor;a(["mcePasteText","mcePasteWord"],function(d){b.addCommand(d,function(){b.windowManager.open({file:c.url+(d=="mcePasteText"?"/pastetext.htm":"/pasteword.htm"),width:parseInt(b.getParam("paste_dialog_width","450")),height:parseInt(b.getParam("paste_dialog_height","400")),inline:1})})});b.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});b.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"});b.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("Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.")}else{e.windowManager.alert("Paste is now in plain text mode. Click again to toggle back to regular paste mode.")}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(p.get("_mcePaste")){return}m=p.add(r,"div",{id:"_mcePaste","class":"mcePaste"},"\uFEFF");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(u){c(p.select("div.mcePaste",u),function(v){p.remove(v,1)});t+=(p.select("> span.Apple-style-span div",u)[0]||p.select("> span.Apple-style-span",u)[0]||u).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;if(!f.selection.isCollapsed()){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)})();
|
@@ -1,16 +1,46 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* editor_plugin_src.js
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
6
9
|
*/
|
7
10
|
|
8
11
|
(function() {
|
9
|
-
var each = tinymce.each
|
12
|
+
var each = tinymce.each,
|
13
|
+
entities = null,
|
14
|
+
defs = {
|
15
|
+
paste_auto_cleanup_on_paste : true,
|
16
|
+
paste_block_drop : false,
|
17
|
+
paste_retain_style_properties : "none",
|
18
|
+
paste_strip_class_attributes : "mso",
|
19
|
+
paste_remove_spans : false,
|
20
|
+
paste_remove_styles : false,
|
21
|
+
paste_remove_styles_if_webkit : true,
|
22
|
+
paste_convert_middot_lists : true,
|
23
|
+
paste_convert_headers_to_strong : false,
|
24
|
+
paste_dialog_width : "450",
|
25
|
+
paste_dialog_height : "400",
|
26
|
+
paste_text_use_dialog : false,
|
27
|
+
paste_text_sticky : false,
|
28
|
+
paste_text_notifyalways : false,
|
29
|
+
paste_text_linebreaktype : "p",
|
30
|
+
paste_text_replacements : [
|
31
|
+
[/\u2026/g, "..."],
|
32
|
+
[/[\x93\x94\u201c\u201d]/g, '"'],
|
33
|
+
[/[\x60\x91\x92\u2018\u2019]/g, "'"]
|
34
|
+
]
|
35
|
+
};
|
36
|
+
|
37
|
+
function getParam(ed, name) {
|
38
|
+
return ed.getParam(name, defs[name]);
|
39
|
+
}
|
10
40
|
|
11
41
|
tinymce.create('tinymce.plugins.PastePlugin', {
|
12
42
|
init : function(ed, url) {
|
13
|
-
var t = this
|
43
|
+
var t = this;
|
14
44
|
|
15
45
|
t.editor = ed;
|
16
46
|
t.url = url;
|
@@ -33,8 +63,12 @@
|
|
33
63
|
ed.execCallback('paste_postprocess', pl, o);
|
34
64
|
});
|
35
65
|
|
66
|
+
// Initialize plain text flag
|
67
|
+
ed.pasteAsPlainText = false;
|
68
|
+
|
36
69
|
// This function executes the process handlers and inserts the contents
|
37
|
-
|
70
|
+
// force_rich overrides plain text mode set by user, important for pasting with execCommand
|
71
|
+
function process(o, force_rich) {
|
38
72
|
var dom = ed.dom;
|
39
73
|
|
40
74
|
// Execute pre process handlers
|
@@ -49,18 +83,51 @@
|
|
49
83
|
// Serialize content
|
50
84
|
o.content = ed.serializer.serialize(o.node, {getInner : 1});
|
51
85
|
|
52
|
-
//
|
53
|
-
if (
|
86
|
+
// Plain text option active?
|
87
|
+
if ((!force_rich) && (ed.pasteAsPlainText)) {
|
88
|
+
t._insertPlainText(ed, dom, o.content);
|
89
|
+
|
90
|
+
if (!getParam(ed, "paste_text_sticky")) {
|
91
|
+
ed.pasteAsPlainText = false;
|
92
|
+
ed.controlManager.setActive("pastetext", false);
|
93
|
+
}
|
94
|
+
} else if (/<(p|h[1-6]|ul|ol)/.test(o.content)) {
|
95
|
+
// Handle insertion of contents containing block elements separately
|
54
96
|
t._insertBlockContent(ed, dom, o.content);
|
55
|
-
else
|
97
|
+
} else {
|
56
98
|
t._insert(o.content);
|
57
|
-
|
99
|
+
}
|
100
|
+
}
|
58
101
|
|
59
102
|
// Add command for external usage
|
60
103
|
ed.addCommand('mceInsertClipboardContent', function(u, o) {
|
61
|
-
process(o);
|
104
|
+
process(o, true);
|
62
105
|
});
|
63
106
|
|
107
|
+
if (!getParam(ed, "paste_text_use_dialog")) {
|
108
|
+
ed.addCommand('mcePasteText', function(u, v) {
|
109
|
+
var cookie = tinymce.util.Cookie;
|
110
|
+
|
111
|
+
ed.pasteAsPlainText = !ed.pasteAsPlainText;
|
112
|
+
ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
|
113
|
+
|
114
|
+
if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
|
115
|
+
if (getParam(ed, "paste_text_sticky")) {
|
116
|
+
ed.windowManager.alert("Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.");
|
117
|
+
} else {
|
118
|
+
ed.windowManager.alert("Paste is now in plain text mode. Click again to toggle back to regular paste mode.");
|
119
|
+
}
|
120
|
+
|
121
|
+
if (!getParam(ed, "paste_text_notifyalways")) {
|
122
|
+
cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
|
123
|
+
}
|
124
|
+
}
|
125
|
+
});
|
126
|
+
}
|
127
|
+
|
128
|
+
ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
|
129
|
+
ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
|
130
|
+
|
64
131
|
// This function grabs the contents from the clipboard by adding a
|
65
132
|
// hidden div and placing the caret inside it and after the browser paste
|
66
133
|
// is done it grabs that contents and processes that
|
@@ -71,7 +138,7 @@
|
|
71
138
|
return;
|
72
139
|
|
73
140
|
// Create container to paste into
|
74
|
-
n = dom.add(body, 'div', {id : '_mcePaste'}, '\uFEFF');
|
141
|
+
n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste'}, '\uFEFF');
|
75
142
|
|
76
143
|
// If contentEditable mode we need to find out the position of the closest element
|
77
144
|
if (body != ed.getDoc().body)
|
@@ -112,6 +179,14 @@
|
|
112
179
|
// Block the real paste event
|
113
180
|
return tinymce.dom.Event.cancel(e);
|
114
181
|
} else {
|
182
|
+
function block(e) {
|
183
|
+
e.preventDefault();
|
184
|
+
};
|
185
|
+
|
186
|
+
// Block mousedown and click to prevent selection change
|
187
|
+
dom.bind(ed.getDoc(), 'mousedown', block);
|
188
|
+
dom.bind(ed.getDoc(), 'keydown', block);
|
189
|
+
|
115
190
|
or = ed.selection.getRng();
|
116
191
|
|
117
192
|
// Move caret into hidden div
|
@@ -123,10 +198,16 @@
|
|
123
198
|
|
124
199
|
// Wait a while and grab the pasted contents
|
125
200
|
window.setTimeout(function() {
|
126
|
-
var h = '', nl = dom.select('div
|
201
|
+
var h = '', nl = dom.select('div.mcePaste');
|
127
202
|
|
128
203
|
// WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
|
129
204
|
each(nl, function(n) {
|
205
|
+
// WebKit duplicates the divs so we need to remove them
|
206
|
+
each(dom.select('div.mcePaste', n), function(n) {
|
207
|
+
dom.remove(n, 1);
|
208
|
+
});
|
209
|
+
|
210
|
+
// Contents in WebKit is sometimes wrapped in a apple style span so we need to grab it from that one
|
130
211
|
h += (dom.select('> span.Apple-style-span div', n)[0] || dom.select('> span.Apple-style-span', n)[0] || n).innerHTML;
|
131
212
|
});
|
132
213
|
|
@@ -140,12 +221,16 @@
|
|
140
221
|
sel.setRng(or);
|
141
222
|
|
142
223
|
process({content : h});
|
224
|
+
|
225
|
+
// Unblock events ones we got the contents
|
226
|
+
dom.unbind(ed.getDoc(), 'mousedown', block);
|
227
|
+
dom.unbind(ed.getDoc(), 'keydown', block);
|
143
228
|
}, 0);
|
144
229
|
}
|
145
|
-
}
|
230
|
+
}
|
146
231
|
|
147
232
|
// Check if we should use the new auto process method
|
148
|
-
if (
|
233
|
+
if (getParam(ed, "paste_auto_cleanup_on_paste")) {
|
149
234
|
// Is it's Opera or older FF use key handler
|
150
235
|
if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
|
151
236
|
ed.onKeyDown.add(function(ed, e) {
|
@@ -161,7 +246,7 @@
|
|
161
246
|
}
|
162
247
|
|
163
248
|
// Block all drag/drop events
|
164
|
-
if (
|
249
|
+
if (getParam(ed, "paste_block_drop")) {
|
165
250
|
ed.onInit.add(function() {
|
166
251
|
ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
|
167
252
|
e.preventDefault();
|
@@ -187,10 +272,15 @@
|
|
187
272
|
},
|
188
273
|
|
189
274
|
_preProcess : function(pl, o) {
|
190
|
-
var ed = this.editor, h = o.content, process, stripClass;
|
191
|
-
|
192
275
|
//console.log('Before preprocess:' + o.content);
|
193
276
|
|
277
|
+
var ed = this.editor,
|
278
|
+
h = o.content,
|
279
|
+
grep = tinymce.grep,
|
280
|
+
explode = tinymce.explode,
|
281
|
+
trim = tinymce.trim,
|
282
|
+
len, stripClass;
|
283
|
+
|
194
284
|
function process(items) {
|
195
285
|
each(items, function(v) {
|
196
286
|
// Remove or replace
|
@@ -199,81 +289,203 @@
|
|
199
289
|
else
|
200
290
|
h = h.replace(v[0], v[1]);
|
201
291
|
});
|
202
|
-
}
|
292
|
+
}
|
203
293
|
|
204
294
|
// Detect Word content and process it more aggressive
|
205
|
-
if (/
|
206
|
-
o.wordContent = true;
|
295
|
+
if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
|
296
|
+
o.wordContent = true; // Mark the pasted contents as word specific content
|
207
297
|
//console.log('Word contents detected.');
|
208
298
|
|
209
299
|
// Process away some basic content
|
210
300
|
process([
|
211
|
-
/^\s*( )+/
|
212
|
-
/( |<br[^>]*>)+\s*$/
|
301
|
+
/^\s*( )+/gi, // entities at the start of contents
|
302
|
+
/( |<br[^>]*>)+\s*$/gi // entities at the end of contents
|
213
303
|
]);
|
214
304
|
|
215
|
-
if (
|
305
|
+
if (getParam(ed, "paste_convert_headers_to_strong")) {
|
306
|
+
h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
|
307
|
+
}
|
308
|
+
|
309
|
+
if (getParam(ed, "paste_convert_middot_lists")) {
|
216
310
|
process([
|
217
|
-
[/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'],
|
218
|
-
[/(<span[^>]
|
219
|
-
[/(<span[^>]+mso-list:[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list to item marker
|
311
|
+
[/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
|
312
|
+
[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol spans to item markers
|
220
313
|
]);
|
221
314
|
}
|
222
315
|
|
223
316
|
process([
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
/<
|
232
|
-
|
317
|
+
// Word comments like conditional comments etc
|
318
|
+
/<!--[\s\S]+?-->/gi,
|
319
|
+
|
320
|
+
// Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
|
321
|
+
/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
|
322
|
+
|
323
|
+
// Convert <s> into <strike> for line-though
|
324
|
+
[/<(\/?)s>/gi, "<$1strike>"],
|
325
|
+
|
326
|
+
// Replace nsbp entites to char since it's easier to handle
|
327
|
+
[/ /gi, "\u00a0"]
|
233
328
|
]);
|
234
329
|
|
330
|
+
// Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
|
331
|
+
// If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
|
332
|
+
do {
|
333
|
+
len = h.length;
|
334
|
+
h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
|
335
|
+
} while (len != h.length);
|
336
|
+
|
235
337
|
// Remove all spans if no styles is to be retained
|
236
|
-
if (
|
338
|
+
if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
|
339
|
+
h = h.replace(/<\/?span[^>]*>/gi, "");
|
340
|
+
} else {
|
341
|
+
// We're keeping styles, so at least clean them up.
|
342
|
+
// CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
|
343
|
+
|
237
344
|
process([
|
238
|
-
|
345
|
+
// Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
|
346
|
+
[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
|
347
|
+
function(str, spaces) {
|
348
|
+
return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
|
349
|
+
}
|
350
|
+
],
|
351
|
+
|
352
|
+
// Examine all styles: delete junk, transform some, and keep the rest
|
353
|
+
[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
|
354
|
+
function(str, tag, style) {
|
355
|
+
var n = [],
|
356
|
+
i = 0,
|
357
|
+
s = explode(trim(style).replace(/"/gi, "'"), ";");
|
358
|
+
|
359
|
+
// Examine each style definition within the tag's style attribute
|
360
|
+
each(s, function(v) {
|
361
|
+
var name, value,
|
362
|
+
parts = explode(v, ":");
|
363
|
+
|
364
|
+
function ensureUnits(v) {
|
365
|
+
return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
|
366
|
+
}
|
367
|
+
|
368
|
+
if (parts.length == 2) {
|
369
|
+
name = parts[0].toLowerCase();
|
370
|
+
value = parts[1].toLowerCase();
|
371
|
+
|
372
|
+
// Translate certain MS Office styles into their CSS equivalents
|
373
|
+
switch (name) {
|
374
|
+
case "mso-padding-alt":
|
375
|
+
case "mso-padding-top-alt":
|
376
|
+
case "mso-padding-right-alt":
|
377
|
+
case "mso-padding-bottom-alt":
|
378
|
+
case "mso-padding-left-alt":
|
379
|
+
case "mso-margin-alt":
|
380
|
+
case "mso-margin-top-alt":
|
381
|
+
case "mso-margin-right-alt":
|
382
|
+
case "mso-margin-bottom-alt":
|
383
|
+
case "mso-margin-left-alt":
|
384
|
+
case "mso-table-layout-alt":
|
385
|
+
case "mso-height":
|
386
|
+
case "mso-width":
|
387
|
+
case "mso-vertical-align-alt":
|
388
|
+
n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
|
389
|
+
return;
|
390
|
+
|
391
|
+
case "horiz-align":
|
392
|
+
n[i++] = "text-align:" + value;
|
393
|
+
return;
|
394
|
+
|
395
|
+
case "vert-align":
|
396
|
+
n[i++] = "vertical-align:" + value;
|
397
|
+
return;
|
398
|
+
|
399
|
+
case "font-color":
|
400
|
+
case "mso-foreground":
|
401
|
+
n[i++] = "color:" + value;
|
402
|
+
return;
|
403
|
+
|
404
|
+
case "mso-background":
|
405
|
+
case "mso-highlight":
|
406
|
+
n[i++] = "background:" + value;
|
407
|
+
return;
|
408
|
+
|
409
|
+
case "mso-default-height":
|
410
|
+
n[i++] = "min-height:" + ensureUnits(value);
|
411
|
+
return;
|
412
|
+
|
413
|
+
case "mso-default-width":
|
414
|
+
n[i++] = "min-width:" + ensureUnits(value);
|
415
|
+
return;
|
416
|
+
|
417
|
+
case "mso-padding-between-alt":
|
418
|
+
n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
|
419
|
+
return;
|
420
|
+
|
421
|
+
case "text-line-through":
|
422
|
+
if ((value == "single") || (value == "double")) {
|
423
|
+
n[i++] = "text-decoration:line-through";
|
424
|
+
}
|
425
|
+
return;
|
426
|
+
|
427
|
+
case "mso-zero-height":
|
428
|
+
if (value == "yes") {
|
429
|
+
n[i++] = "display:none";
|
430
|
+
}
|
431
|
+
return;
|
432
|
+
}
|
433
|
+
|
434
|
+
// Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
|
435
|
+
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(name)) {
|
436
|
+
return;
|
437
|
+
}
|
438
|
+
|
439
|
+
// If it reached this point, it must be a valid CSS style
|
440
|
+
n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
|
441
|
+
}
|
442
|
+
});
|
443
|
+
|
444
|
+
// If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
|
445
|
+
if (i > 0) {
|
446
|
+
return tag + ' style="' + n.join(';') + '"';
|
447
|
+
} else {
|
448
|
+
return tag;
|
449
|
+
}
|
450
|
+
}
|
451
|
+
]
|
239
452
|
]);
|
240
453
|
}
|
241
454
|
}
|
242
455
|
|
243
|
-
//
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
456
|
+
// Replace headers with <strong>
|
457
|
+
if (getParam(ed, "paste_convert_headers_to_strong")) {
|
458
|
+
process([
|
459
|
+
[/<h[1-6][^>]*>/gi, "<p><strong>"],
|
460
|
+
[/<\/h[1-6][^>]*>/gi, "</strong></p>"]
|
461
|
+
]);
|
462
|
+
}
|
250
463
|
|
251
|
-
|
252
|
-
|
253
|
-
|
464
|
+
// Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
|
465
|
+
// Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
|
466
|
+
stripClass = getParam(ed, "paste_strip_class_attributes");
|
254
467
|
|
255
|
-
|
468
|
+
if (stripClass !== "none") {
|
469
|
+
function removeClasses(match, g1) {
|
470
|
+
if (stripClass === "all")
|
471
|
+
return '';
|
256
472
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
473
|
+
var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
|
474
|
+
function(v) {
|
475
|
+
return (/^(?!mso)/i.test(v));
|
476
|
+
}
|
477
|
+
);
|
262
478
|
|
263
|
-
|
479
|
+
return cls.length ? ' class="' + cls.join(" ") + '"' : '';
|
264
480
|
};
|
265
481
|
|
266
|
-
|
267
|
-
|
268
|
-
[/ class=(\w+)/gi, cleanClasses] // class attributes without quotes (IE)
|
269
|
-
]);
|
482
|
+
h = h.replace(/ class="([^"]+)"/gi, removeClasses);
|
483
|
+
h = h.replace(/ class=(\w+)/gi, removeClasses);
|
270
484
|
}
|
271
485
|
|
272
486
|
// Remove spans option
|
273
|
-
if (
|
274
|
-
|
275
|
-
/<\/?(span)[^>]*>/gi
|
276
|
-
]);
|
487
|
+
if (getParam(ed, "paste_remove_spans")) {
|
488
|
+
h = h.replace(/<\/?span[^>]*>/gi, "");
|
277
489
|
}
|
278
490
|
|
279
491
|
//console.log('After preprocess:' + h);
|
@@ -294,56 +506,58 @@
|
|
294
506
|
dom.remove(a, 1);
|
295
507
|
});
|
296
508
|
|
297
|
-
if (
|
509
|
+
if (getParam(ed, "paste_convert_middot_lists")) {
|
298
510
|
t._convertLists(pl, o);
|
511
|
+
}
|
299
512
|
|
300
513
|
// Process styles
|
301
|
-
styleProps =
|
514
|
+
styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
|
302
515
|
|
303
|
-
//
|
304
|
-
if (tinymce.is(styleProps,
|
305
|
-
styleProps = tinymce.explode(styleProps);
|
516
|
+
// Process only if a string was specified and not equal to "all" or "*"
|
517
|
+
if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
|
518
|
+
styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
|
306
519
|
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
520
|
+
// Retains some style properties
|
521
|
+
each(dom.select('*', o.node), function(el) {
|
522
|
+
var newStyle = {}, npc = 0, i, sp, sv;
|
523
|
+
|
524
|
+
// Store a subset of the existing styles
|
525
|
+
if (styleProps) {
|
526
|
+
for (i = 0; i < styleProps.length; i++) {
|
527
|
+
sp = styleProps[i];
|
528
|
+
sv = dom.getStyle(el, sp);
|
529
|
+
|
530
|
+
if (sv) {
|
531
|
+
newStyle[sp] = sv;
|
532
|
+
npc++;
|
533
|
+
}
|
320
534
|
}
|
321
535
|
}
|
322
|
-
}
|
323
536
|
|
324
|
-
|
325
|
-
|
537
|
+
// Remove all of the existing styles
|
538
|
+
dom.setAttrib(el, 'style', '');
|
326
539
|
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
540
|
+
if (styleProps && npc > 0)
|
541
|
+
dom.setStyles(el, newStyle); // Add back the stored subset of styles
|
542
|
+
else // Remove empty span tags that do not have class attributes
|
543
|
+
if (el.nodeName == 'SPAN' && !el.className)
|
544
|
+
dom.remove(el, true);
|
545
|
+
});
|
546
|
+
}
|
333
547
|
}
|
334
548
|
|
335
549
|
// Remove all style information or only specifically on WebKit to avoid the style bug on that browser
|
336
|
-
if (
|
550
|
+
if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
|
337
551
|
each(dom.select('*[style]', o.node), function(el) {
|
338
552
|
el.removeAttribute('style');
|
339
|
-
el.removeAttribute('
|
553
|
+
el.removeAttribute('_mce_style');
|
340
554
|
});
|
341
555
|
} else {
|
342
556
|
if (tinymce.isWebKit) {
|
343
557
|
// We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
|
344
558
|
// Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
|
345
559
|
each(dom.select('*', o.node), function(el) {
|
346
|
-
el.removeAttribute('
|
560
|
+
el.removeAttribute('_mce_style');
|
347
561
|
});
|
348
562
|
}
|
349
563
|
}
|
@@ -435,7 +649,7 @@
|
|
435
649
|
* This logic can be improved so text nodes at the start/end remain in the start/end block elements
|
436
650
|
*/
|
437
651
|
_insertBlockContent : function(ed, dom, content) {
|
438
|
-
var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight;
|
652
|
+
var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight, markerId = 'mce_marker';
|
439
653
|
|
440
654
|
function select(n) {
|
441
655
|
var r;
|
@@ -449,11 +663,11 @@
|
|
449
663
|
sel.select(n, 1);
|
450
664
|
sel.collapse(false);
|
451
665
|
}
|
452
|
-
}
|
666
|
+
}
|
453
667
|
|
454
668
|
// Insert a marker for the caret position
|
455
|
-
this._insert('<span id="
|
456
|
-
marker = dom.get(
|
669
|
+
this._insert('<span id="' + markerId + '"> </span>', 1);
|
670
|
+
marker = dom.get(markerId);
|
457
671
|
parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td');
|
458
672
|
|
459
673
|
// If it's a parent block but not a table cell
|
@@ -474,7 +688,9 @@
|
|
474
688
|
sel.collapse(0);
|
475
689
|
}
|
476
690
|
|
477
|
-
|
691
|
+
// Remove marker if it's left
|
692
|
+
while (elm = dom.get(markerId))
|
693
|
+
dom.remove(elm);
|
478
694
|
|
479
695
|
// Get element, position and height
|
480
696
|
elm = sel.getStart();
|
@@ -501,31 +717,213 @@
|
|
501
717
|
ed.execCommand(tinymce.isGecko ? 'insertHTML' : 'mceInsertContent', false, h, {skip_undo : skip_undo});
|
502
718
|
},
|
503
719
|
|
720
|
+
/**
|
721
|
+
* Instead of the old plain text method which tried to re-create a paste operation, the
|
722
|
+
* new approach adds a plain text mode toggle switch that changes the behavior of paste.
|
723
|
+
* This function is passed the same input that the regular paste plugin produces.
|
724
|
+
* It performs additional scrubbing and produces (and inserts) the plain text.
|
725
|
+
* This approach leverages all of the great existing functionality in the paste
|
726
|
+
* plugin, and requires minimal changes to add the new functionality.
|
727
|
+
* Speednet - June 2009
|
728
|
+
*/
|
729
|
+
_insertPlainText : function(ed, dom, h) {
|
730
|
+
var i, len, pos, rpos, node, breakElms, before, after,
|
731
|
+
w = ed.getWin(),
|
732
|
+
d = ed.getDoc(),
|
733
|
+
sel = ed.selection,
|
734
|
+
is = tinymce.is,
|
735
|
+
inArray = tinymce.inArray,
|
736
|
+
linebr = getParam(ed, "paste_text_linebreaktype"),
|
737
|
+
rl = getParam(ed, "paste_text_replacements");
|
738
|
+
|
739
|
+
function process(items) {
|
740
|
+
each(items, function(v) {
|
741
|
+
if (v.constructor == RegExp)
|
742
|
+
h = h.replace(v, "");
|
743
|
+
else
|
744
|
+
h = h.replace(v[0], v[1]);
|
745
|
+
});
|
746
|
+
};
|
747
|
+
|
748
|
+
if ((typeof(h) === "string") && (h.length > 0)) {
|
749
|
+
if (!entities)
|
750
|
+
entities = ("34,quot,38,amp,39,apos,60,lt,62,gt," + ed.serializer.settings.entities).split(",");
|
751
|
+
|
752
|
+
// If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
|
753
|
+
if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) {
|
754
|
+
process([
|
755
|
+
/[\n\r]+/g
|
756
|
+
]);
|
757
|
+
} else {
|
758
|
+
// Otherwise just get rid of carriage returns (only need linefeeds)
|
759
|
+
process([
|
760
|
+
/\r+/g
|
761
|
+
]);
|
762
|
+
}
|
763
|
+
|
764
|
+
process([
|
765
|
+
[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
|
766
|
+
[/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
|
767
|
+
[/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
|
768
|
+
/<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
|
769
|
+
[/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
|
770
|
+
[
|
771
|
+
// HTML entity
|
772
|
+
/&(#\d+|[a-z0-9]{1,10});/gi,
|
773
|
+
|
774
|
+
// Replace with actual character
|
775
|
+
function(e, s) {
|
776
|
+
if (s.charAt(0) === "#") {
|
777
|
+
return String.fromCharCode(s.slice(1));
|
778
|
+
}
|
779
|
+
else {
|
780
|
+
return ((e = inArray(entities, s)) > 0)? String.fromCharCode(entities[e-1]) : " ";
|
781
|
+
}
|
782
|
+
}
|
783
|
+
],
|
784
|
+
[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars.
|
785
|
+
[/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks
|
786
|
+
/^\s+|\s+$/g // Trim the front & back
|
787
|
+
]);
|
788
|
+
|
789
|
+
h = dom.encode(h);
|
790
|
+
|
791
|
+
// Delete any highlighted text before pasting
|
792
|
+
if (!sel.isCollapsed()) {
|
793
|
+
d.execCommand("Delete", false, null);
|
794
|
+
}
|
795
|
+
|
796
|
+
// Perform default or custom replacements
|
797
|
+
if (is(rl, "array") || (is(rl, "array"))) {
|
798
|
+
process(rl);
|
799
|
+
}
|
800
|
+
else if (is(rl, "string")) {
|
801
|
+
process(new RegExp(rl, "gi"));
|
802
|
+
}
|
803
|
+
|
804
|
+
// Treat paragraphs as specified in the config
|
805
|
+
if (linebr == "none") {
|
806
|
+
process([
|
807
|
+
[/\n+/g, " "]
|
808
|
+
]);
|
809
|
+
}
|
810
|
+
else if (linebr == "br") {
|
811
|
+
process([
|
812
|
+
[/\n/g, "<br />"]
|
813
|
+
]);
|
814
|
+
}
|
815
|
+
else {
|
816
|
+
process([
|
817
|
+
/^\s+|\s+$/g,
|
818
|
+
[/\n\n/g, "</p><p>"],
|
819
|
+
[/\n/g, "<br />"]
|
820
|
+
]);
|
821
|
+
}
|
822
|
+
|
823
|
+
// This next piece of code handles the situation where we're pasting more than one paragraph of plain
|
824
|
+
// text, and we are pasting the content into the middle of a block node in the editor. The block
|
825
|
+
// node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining).
|
826
|
+
// The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the
|
827
|
+
// pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between
|
828
|
+
// "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and
|
829
|
+
// now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the
|
830
|
+
// plain text take the same style as the existing paragraph.)
|
831
|
+
if ((pos = h.indexOf("</p><p>")) != -1) {
|
832
|
+
rpos = h.lastIndexOf("</p><p>");
|
833
|
+
node = sel.getNode();
|
834
|
+
breakElms = []; // Get list of elements to break
|
835
|
+
|
836
|
+
do {
|
837
|
+
if (node.nodeType == 1) {
|
838
|
+
// Don't break tables and break at body
|
839
|
+
if (node.nodeName == "TD" || node.nodeName == "BODY") {
|
840
|
+
break;
|
841
|
+
}
|
842
|
+
|
843
|
+
breakElms[breakElms.length] = node;
|
844
|
+
}
|
845
|
+
} while (node = node.parentNode);
|
846
|
+
|
847
|
+
// Are we in the middle of a block node?
|
848
|
+
if (breakElms.length > 0) {
|
849
|
+
before = h.substring(0, pos);
|
850
|
+
after = "";
|
851
|
+
|
852
|
+
for (i=0, len=breakElms.length; i<len; i++) {
|
853
|
+
before += "</" + breakElms[i].nodeName.toLowerCase() + ">";
|
854
|
+
after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">";
|
855
|
+
}
|
856
|
+
|
857
|
+
if (pos == rpos) {
|
858
|
+
h = before + after + h.substring(pos+7);
|
859
|
+
}
|
860
|
+
else {
|
861
|
+
h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7);
|
862
|
+
}
|
863
|
+
}
|
864
|
+
}
|
865
|
+
|
866
|
+
// Insert content at the caret, plus add a marker for repositioning the caret
|
867
|
+
ed.execCommand("mceInsertRawHTML", false, h + '<span id="_plain_text_marker"> </span>');
|
868
|
+
|
869
|
+
// Reposition the caret to the marker, which was placed immediately after the inserted content.
|
870
|
+
// Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers.
|
871
|
+
// The second part of the code scrolls the content up if the caret is positioned off-screen.
|
872
|
+
// This is only necessary for WebKit browsers, but it doesn't hurt to use for all.
|
873
|
+
window.setTimeout(function() {
|
874
|
+
var marker = dom.get('_plain_text_marker'),
|
875
|
+
elm, vp, y, elmHeight;
|
876
|
+
|
877
|
+
sel.select(marker, false);
|
878
|
+
d.execCommand("Delete", false, null);
|
879
|
+
marker = null;
|
880
|
+
|
881
|
+
// Get element, position and height
|
882
|
+
elm = sel.getStart();
|
883
|
+
vp = dom.getViewPort(w);
|
884
|
+
y = dom.getPos(elm).y;
|
885
|
+
elmHeight = elm.clientHeight;
|
886
|
+
|
887
|
+
// Is element within viewport if not then scroll it into view
|
888
|
+
if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) {
|
889
|
+
d.body.scrollTop = y < vp.y ? y : y - vp.h + 25;
|
890
|
+
}
|
891
|
+
}, 0);
|
892
|
+
}
|
893
|
+
},
|
894
|
+
|
504
895
|
/**
|
505
896
|
* This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
|
506
897
|
*/
|
507
898
|
_legacySupport : function() {
|
508
899
|
var t = this, ed = t.editor;
|
509
900
|
|
510
|
-
// Register
|
511
|
-
|
512
|
-
ed.
|
901
|
+
// Register command(s) for backwards compatibility
|
902
|
+
ed.addCommand("mcePasteWord", function() {
|
903
|
+
ed.windowManager.open({
|
904
|
+
file: t.url + "/pasteword.htm",
|
905
|
+
width: parseInt(getParam(ed, "paste_dialog_width")),
|
906
|
+
height: parseInt(getParam(ed, "paste_dialog_height")),
|
907
|
+
inline: 1
|
908
|
+
});
|
909
|
+
});
|
910
|
+
|
911
|
+
if (getParam(ed, "paste_text_use_dialog")) {
|
912
|
+
ed.addCommand("mcePasteText", function() {
|
513
913
|
ed.windowManager.open({
|
514
|
-
file : t.url +
|
515
|
-
width
|
516
|
-
height
|
914
|
+
file : t.url + "/pastetext.htm",
|
915
|
+
width: parseInt(getParam(ed, "paste_dialog_width")),
|
916
|
+
height: parseInt(getParam(ed, "paste_dialog_height")),
|
517
917
|
inline : 1
|
518
918
|
});
|
519
919
|
});
|
520
|
-
}
|
920
|
+
}
|
521
921
|
|
522
|
-
// Register
|
523
|
-
ed.addButton(
|
524
|
-
ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord'});
|
525
|
-
ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'selectall'});
|
922
|
+
// Register button for backwards compatibility
|
923
|
+
ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
|
526
924
|
}
|
527
925
|
});
|
528
926
|
|
529
927
|
// Register plugin
|
530
|
-
tinymce.PluginManager.add(
|
531
|
-
})();
|
928
|
+
tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
|
929
|
+
})();
|