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,10 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* editable_selects.js
|
3
3
|
*
|
4
|
-
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
5
6
|
*
|
6
|
-
*
|
7
|
-
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
8
9
|
*/
|
9
10
|
|
10
11
|
var TinyMCE_EditableSelects = {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* form_utils.js
|
3
3
|
*
|
4
|
-
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
5
6
|
*
|
6
|
-
*
|
7
|
-
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
8
9
|
*/
|
9
10
|
|
10
11
|
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* mctabs.js
|
3
3
|
*
|
4
|
-
* Moxiecode
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
5
6
|
*
|
6
|
-
*
|
7
|
-
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
8
9
|
*/
|
9
10
|
|
10
11
|
function MCTabs() {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* validate.js
|
3
3
|
*
|
4
|
-
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
5
6
|
*
|
6
|
-
*
|
7
|
-
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
8
9
|
*/
|
9
10
|
|
10
11
|
/**
|
data/lib/tiny_mce/base.rb
CHANGED
@@ -11,38 +11,26 @@ module TinyMCE
|
|
11
11
|
# Takes options hash, raw_options string, and any normal params you
|
12
12
|
# can send to a before_filter (only, except etc)
|
13
13
|
def uses_tiny_mce(options = {})
|
14
|
-
|
15
|
-
raw_tiny_mce_options = options.delete(:raw_options) || ''
|
16
|
-
|
17
|
-
# Allow users to have default options in config/tiny_mce.yml so that
|
18
|
-
# they do not need to specify the same options over all controllers
|
19
|
-
tiny_mce_yaml_filepath = File.join(RAILS_ROOT, 'config', 'tiny_mce.yml')
|
20
|
-
if File.exist?(tiny_mce_yaml_filepath)
|
21
|
-
yaml_options = YAML::load(IO.read(tiny_mce_yaml_filepath)) rescue Hash.new
|
22
|
-
tiny_mce_options = yaml_options.merge(tiny_mce_options) if yaml_options
|
23
|
-
end
|
14
|
+
configuration = TinyMCE::Configuration.new(options.delete(:options), options.delete(:raw_options))
|
24
15
|
|
25
16
|
# If the tiny_mce plugins includes the spellchecker, then form a spellchecking path,
|
26
17
|
# add it to the tiny_mce_options, and include the SpellChecking module
|
27
|
-
if
|
28
|
-
|
29
|
-
self.class_eval
|
30
|
-
include TinyMCE::SpellChecker
|
31
|
-
end
|
18
|
+
if configuration.plugins.include?('spellchecker')
|
19
|
+
configuration.reverse_add_options("spellchecker_rpc_url" => "/" + self.controller_name + "/spellchecker")
|
20
|
+
self.class_eval { include TinyMCE::SpellChecker }
|
32
21
|
end
|
33
22
|
|
34
23
|
# Set instance vars in the current class
|
35
24
|
proc = Proc.new do |c|
|
36
|
-
c.
|
37
|
-
|
25
|
+
configurations = c.instance_variable_get(:@tiny_mce_configurations) || []
|
26
|
+
configurations << configuration
|
27
|
+
c.instance_variable_set(:@tiny_mce_configurations, configurations)
|
38
28
|
c.instance_variable_set(:@uses_tiny_mce, true)
|
39
29
|
end
|
40
30
|
|
41
31
|
# Run the above proc before each page load this method is declared in
|
42
32
|
before_filter(proc, options)
|
43
33
|
end
|
44
|
-
|
45
34
|
end
|
46
|
-
|
47
35
|
end
|
48
36
|
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
module TinyMCE
|
2
|
+
class Configuration
|
3
|
+
# We use this to combine options and raw_options into one class and validate
|
4
|
+
# whether options passed in by the users are valid tiny mce configuration settings.
|
5
|
+
# Also loads which options are valid, and provides an plugins attribute to allow
|
6
|
+
# more configuration options dynamicly
|
7
|
+
|
8
|
+
DEFAULT_OPTIONS = {
|
9
|
+
'mode' => 'textareas',
|
10
|
+
'editor_selector' => 'mceEditor',
|
11
|
+
'theme' => 'simple',
|
12
|
+
'language' => (defined?(I18n) ? I18n.locale : :en)
|
13
|
+
}
|
14
|
+
|
15
|
+
def self.config_file_options
|
16
|
+
@@config_file_options ||= begin
|
17
|
+
tiny_mce_yaml_filepath = File.join(RAILS_ROOT, 'config', 'tiny_mce.yml')
|
18
|
+
# The YAML file might not exist, might be blank, might be invalid, or
|
19
|
+
# might be valid. Catch all cases and make sure we always return a Hash
|
20
|
+
(YAML::load(IO.read(tiny_mce_yaml_filepath)) rescue nil) || Hash.new
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Parse the options file and load it into an array
|
25
|
+
# (this method is called when tiny_mce is initialized - see init.rb)
|
26
|
+
def self.valid_options
|
27
|
+
@@valid_options ||= begin
|
28
|
+
valid_options_path = File.join(File.dirname(__FILE__), 'valid_tinymce_options.yml')
|
29
|
+
File.open(valid_options_path) { |f| YAML.load(f.read) }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
attr_accessor :options, :raw_options
|
34
|
+
|
35
|
+
def initialize(options = {}, raw_options = nil)
|
36
|
+
options = Hash.new unless options.is_a?(Hash)
|
37
|
+
@options = DEFAULT_OPTIONS.merge(self.class.config_file_options.stringify_keys).
|
38
|
+
merge(options.stringify_keys)
|
39
|
+
@raw_options = [raw_options]
|
40
|
+
end
|
41
|
+
|
42
|
+
# Merge additional options and raw_options
|
43
|
+
def add_options(options = {}, raw_options = nil)
|
44
|
+
@options.merge!(options.stringify_keys) unless options.blank?
|
45
|
+
@raw_options << raw_options unless raw_options.blank?
|
46
|
+
end
|
47
|
+
|
48
|
+
# Merge additional options and raw_options, but don't overwrite existing
|
49
|
+
def reverse_add_options(options = {}, raw_options = nil)
|
50
|
+
@options.reverse_merge!(options.stringify_keys) unless options.blank?
|
51
|
+
@raw_options << raw_options unless raw_options.blank?
|
52
|
+
end
|
53
|
+
|
54
|
+
def plugins
|
55
|
+
@options['plugins'] || []
|
56
|
+
end
|
57
|
+
|
58
|
+
# Validate and merge options and raw_options into a string
|
59
|
+
# to be used for tinyMCE.init() in the raw_tiny_mce_init helper
|
60
|
+
def to_json
|
61
|
+
raise TinyMCEInvalidOptionType.invalid_type_of(plugins, :for => :plugins) unless plugins.is_a?(Array)
|
62
|
+
|
63
|
+
json_options = []
|
64
|
+
@options.each_pair do |key, value|
|
65
|
+
raise TinyMCEInvalidOption.invalid_option(key) unless valid?(key)
|
66
|
+
json_options << "#{key} : " + case value
|
67
|
+
when String, Symbol, Fixnum
|
68
|
+
"'#{value.to_s}'"
|
69
|
+
when Array
|
70
|
+
'"' + value.join(',') + '"'
|
71
|
+
when TrueClass
|
72
|
+
'true'
|
73
|
+
when FalseClass
|
74
|
+
'false'
|
75
|
+
else
|
76
|
+
raise TinyMCEInvalidOptionType.invalid_type_of(value, :for => key)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
json_options.sort!
|
81
|
+
|
82
|
+
@raw_options.compact!
|
83
|
+
json_options += @raw_options unless @raw_options.blank?
|
84
|
+
|
85
|
+
"{\n" + json_options.delete_if {|o| o.blank? }.join(",\n") + "\n\n}"
|
86
|
+
end
|
87
|
+
|
88
|
+
# Does the check to see if the option is valid. It checks the valid_options
|
89
|
+
# array (see above), checks if the start of the option name is in the plugin list
|
90
|
+
# or checks if it's an theme_advanced_container setting
|
91
|
+
def valid?(option)
|
92
|
+
option = option.to_s
|
93
|
+
self.class.valid_options.include?(option) ||
|
94
|
+
plugins.include?(option.split('_').first) ||
|
95
|
+
option =~ /^theme_advanced_container_\w+$/
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TinyMCE
|
2
|
+
# Setup a couple of Exception classes that we use later on
|
3
|
+
class TinyMCEInvalidOption < Exception
|
4
|
+
def self.invalid_option(option)
|
5
|
+
new "Invalid option #{option} passed to tinymce"
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class TinyMCEInvalidOptionType < Exception
|
10
|
+
def self.invalid_type_of(value, parameters={})
|
11
|
+
new "Invalid value of type #{value.class} passed for TinyMCE option #{parameters[:for].to_s}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/tiny_mce/helpers.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
module TinyMCE
|
2
2
|
# The helper module we include into ActionController::Base
|
3
3
|
module Helpers
|
4
|
-
# Setup a couple of Exception classes that we use later on
|
5
|
-
class TinyMCEInvalidOption < Exception; end
|
6
|
-
class TinyMCEInvalidOptionType < Exception; end
|
7
4
|
|
8
5
|
# Has uses_tiny_mce method been declared in the controller for this page?
|
9
6
|
def using_tiny_mce?
|
@@ -12,60 +9,27 @@ module TinyMCE
|
|
12
9
|
|
13
10
|
# Parse @tiny_mce_options and @raw_tiny_mce_options to create a raw JS string
|
14
11
|
# used by TinyMCE. Returns errors if the option or options type is invalid
|
15
|
-
def raw_tiny_mce_init(options = {}, raw_options =
|
16
|
-
|
17
|
-
|
18
|
-
@
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
raw_options = @raw_tiny_mce_options + raw_options unless @raw_tiny_mce_options.nil?
|
25
|
-
|
26
|
-
unless options['plugins'].nil?
|
27
|
-
raise TinyMCEInvalidOptionType.new("Invalid value of type #{options['plugins'].class} passed for TinyMCE option plugins") unless options['plugins'].kind_of?(Array)
|
28
|
-
|
29
|
-
# Append the plugins we have enabled for this field to the OptionsValidator
|
30
|
-
TinyMCE::OptionValidator.plugins += options['plugins']
|
12
|
+
def raw_tiny_mce_init(options = {}, raw_options = nil)
|
13
|
+
tinymce_js = ""
|
14
|
+
|
15
|
+
@tiny_mce_configurations ||= [Configuration.new]
|
16
|
+
@tiny_mce_configurations.each do |configuration|
|
17
|
+
configuration.add_options(options, raw_options)
|
18
|
+
tinymce_js += "tinyMCE.init("
|
19
|
+
tinymce_js += configuration.to_json
|
20
|
+
tinymce_js += ");"
|
31
21
|
end
|
32
22
|
|
33
|
-
tinymce_js
|
34
|
-
options.sort.each_with_index do |values, index|
|
35
|
-
key, value = values[0], values[1]
|
36
|
-
raise TinyMCEInvalidOption.new("Invalid option #{key} passed to tinymce") unless TinyMCE::OptionValidator.valid?(key)
|
37
|
-
tinymce_js += "#{key} : "
|
38
|
-
case value
|
39
|
-
when String, Symbol, Fixnum
|
40
|
-
tinymce_js += "'#{value.to_s}'"
|
41
|
-
when Array
|
42
|
-
tinymce_js += '"' + value.join(',') + '"'
|
43
|
-
when TrueClass
|
44
|
-
tinymce_js += 'true'
|
45
|
-
when FalseClass
|
46
|
-
tinymce_js += 'false'
|
47
|
-
else
|
48
|
-
raise TinyMCEInvalidOptionType.new("Invalid value of type #{value.class} passed for TinyMCE option #{key}")
|
49
|
-
end
|
50
|
-
if (index < options.size - 1)
|
51
|
-
# there are more options in this array
|
52
|
-
tinymce_js += ",\n"
|
53
|
-
else
|
54
|
-
# no more options in this array. Finish it by adding the addition JS
|
55
|
-
tinymce_js += ",\n#{raw_options}" unless raw_options.blank?
|
56
|
-
tinymce_js += "\n"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
tinymce_js += "\n});"
|
23
|
+
tinymce_js
|
60
24
|
end
|
61
25
|
|
62
26
|
# Form the raw JS and wrap in in a <script> tag for inclusion in the <head>
|
63
|
-
def tiny_mce_init(options = {}, raw_options =
|
27
|
+
def tiny_mce_init(options = {}, raw_options = nil)
|
64
28
|
javascript_tag raw_tiny_mce_init(options, raw_options)
|
65
29
|
end
|
66
30
|
# Form the raw JS and wrap in in a <script> tag for inclusion in the <head>
|
67
31
|
# (only if tiny mce is actually being used)
|
68
|
-
def tiny_mce_init_if_needed(options = {}, raw_options =
|
32
|
+
def tiny_mce_init_if_needed(options = {}, raw_options = nil)
|
69
33
|
tiny_mce_init(options, raw_options) if using_tiny_mce?
|
70
34
|
end
|
71
35
|
|
@@ -82,7 +46,7 @@ module TinyMCE
|
|
82
46
|
# Form a JS include tag for the TinyMCE JS src, and form the raw JS and wrap
|
83
47
|
# in in a <script> tag for inclusion in the <head> for inclusion in the <head>
|
84
48
|
# (only if tiny mce is actually being used)
|
85
|
-
def include_tiny_mce_if_needed(options = {}, raw_options =
|
49
|
+
def include_tiny_mce_if_needed(options = {}, raw_options = nil)
|
86
50
|
if using_tiny_mce?
|
87
51
|
include_tiny_mce_js + tiny_mce_init(options, raw_options)
|
88
52
|
end
|
@@ -4,7 +4,6 @@
|
|
4
4
|
#
|
5
5
|
|
6
6
|
# General
|
7
|
-
- accessibility_focus
|
8
7
|
- accessibility_warnings
|
9
8
|
- auto_focus
|
10
9
|
- browsers
|
@@ -26,7 +25,6 @@
|
|
26
25
|
- skin
|
27
26
|
- skin_variant
|
28
27
|
- strict_loading_mode
|
29
|
-
- tab_focus
|
30
28
|
- table_inline_editing
|
31
29
|
- theme
|
32
30
|
|
@@ -76,6 +74,7 @@
|
|
76
74
|
- remove_linebreaks
|
77
75
|
- remove_redundant_brs
|
78
76
|
- preformatted
|
77
|
+
- style_formats
|
79
78
|
- valid_child_elements
|
80
79
|
- valid_elements
|
81
80
|
- verify_css_classes
|
@@ -113,10 +112,6 @@
|
|
113
112
|
- external_link_list_url
|
114
113
|
- external_image_list_url
|
115
114
|
|
116
|
-
# Tab specific
|
117
|
-
- display_tab_class
|
118
|
-
- hidden_tab_class
|
119
|
-
|
120
115
|
# Triggers/Patches
|
121
116
|
- add_form_submit_trigger
|
122
117
|
- add_unload_trigger
|
@@ -34,8 +34,8 @@ class FullTinyMCEControllerTest < ActionController::TestCase
|
|
34
34
|
get :show_page
|
35
35
|
assert_response :success
|
36
36
|
assert_nil assigns(:uses_tiny_mce)
|
37
|
-
assert_nil assigns(:
|
38
|
-
assert_nil assigns(:raw_tiny_mce_options)
|
37
|
+
assert_nil assigns(:tiny_mce_configurations)
|
38
|
+
# assert_nil assigns(:raw_tiny_mce_options)
|
39
39
|
end
|
40
40
|
|
41
41
|
#
|
@@ -53,8 +53,8 @@ class FullTinyMCEControllerTest < ActionController::TestCase
|
|
53
53
|
|
54
54
|
test "the spellchecker has a default path to use" do
|
55
55
|
get :new_page
|
56
|
-
assert_not_nil assigns(:
|
57
|
-
assert_equal assigns(:
|
56
|
+
assert_not_nil assigns(:tiny_mce_configurations).first
|
57
|
+
assert_equal assigns(:tiny_mce_configurations).first.options["spellchecker_rpc_url"], "/full_tiny_mce/spellchecker"
|
58
58
|
end
|
59
59
|
|
60
60
|
private
|
@@ -63,12 +63,9 @@ class FullTinyMCEControllerTest < ActionController::TestCase
|
|
63
63
|
assert_response :success
|
64
64
|
assert (assigns(:uses_tiny_mce) &&
|
65
65
|
assigns(:uses_tiny_mce) == true)
|
66
|
-
assert (assigns(:
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
assert (assigns(:raw_tiny_mce_options) &&
|
71
|
-
assigns(:raw_tiny_mce_options) == '')
|
66
|
+
assert (assigns(:tiny_mce_configurations) &&
|
67
|
+
assigns(:tiny_mce_configurations).is_a?(Array) &&
|
68
|
+
assigns(:tiny_mce_configurations).first.options == { "spellchecker_rpc_url"=> "/full_tiny_mce/spellchecker",
|
69
|
+
"plugins" => ['spellchecker'] })
|
72
70
|
end
|
73
|
-
|
74
|
-
end
|
71
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
# Make a test class with full options
|
4
|
+
class MultiConfigurationTinyMCEController < ApplicationController
|
5
|
+
uses_tiny_mce :options => { :plugins => ['spellchecker'] },
|
6
|
+
:raw_options => '',
|
7
|
+
:only => ['new_page','edit_page']
|
8
|
+
uses_tiny_mce :options => { :plugins => ['paste','fullscreen'] },
|
9
|
+
:raw_options => '',
|
10
|
+
:only => ['edit_page']
|
11
|
+
include TinyMCEActions
|
12
|
+
end
|
13
|
+
|
14
|
+
# Lets make sure that if routes arn't the
|
15
|
+
# defaults, these tests will still work
|
16
|
+
ActionController::Routing::Routes.draw do |map|
|
17
|
+
map.with_options :controller => 'multi_configuration_tiny_mce' do |tiny_mce|
|
18
|
+
tiny_mce.connect '/full_tiny_mce/new_page', :action => 'new_page'
|
19
|
+
tiny_mce.connect '/full_tiny_mce/edit_page', :action => 'edit_page'
|
20
|
+
tiny_mce.connect '/full_tiny_mce/show_page', :action => 'show_page'
|
21
|
+
tiny_mce.connect '/full_tiny_mce/spellchecker', :action => 'spellchecker'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# Use non-default action names to get around possible authentication
|
26
|
+
# filters to ensure the tests work in most cases
|
27
|
+
class MultiConfigurationTinyMCEControllerTest < ActionController::TestCase
|
28
|
+
|
29
|
+
test "all instance variables are properly set on new" do
|
30
|
+
get :new_page
|
31
|
+
assert_response :success
|
32
|
+
assert (assigns(:uses_tiny_mce) &&
|
33
|
+
assigns(:uses_tiny_mce) == true)
|
34
|
+
assert (assigns(:tiny_mce_configurations) &&
|
35
|
+
assigns(:tiny_mce_configurations).is_a?(Array) &&
|
36
|
+
assigns(:tiny_mce_configurations).first.options == { "spellchecker_rpc_url"=> "/multi_configuration_tiny_mce/spellchecker",
|
37
|
+
"plugins" => ['spellchecker'] })
|
38
|
+
end
|
39
|
+
|
40
|
+
test "all instance variables are properly set on edit" do
|
41
|
+
get :edit_page
|
42
|
+
assert_response :success
|
43
|
+
assert (assigns(:uses_tiny_mce) &&
|
44
|
+
assigns(:uses_tiny_mce) == true)
|
45
|
+
assert (assigns(:tiny_mce_configurations) &&
|
46
|
+
assigns(:tiny_mce_configurations).is_a?(Array) &&
|
47
|
+
assigns(:tiny_mce_configurations).first.options == { "spellchecker_rpc_url"=> "/multi_configuration_tiny_mce/spellchecker",
|
48
|
+
"plugins" => ['spellchecker'] } &&
|
49
|
+
assigns(:tiny_mce_configurations).second.options == { "plugins" => ['paste','fullscreen'] })
|
50
|
+
end
|
51
|
+
|
52
|
+
test "tiny mce is only loaded on the pages specified to the uses_tiny_mce declaration" do
|
53
|
+
get :show_page
|
54
|
+
assert_response :success
|
55
|
+
assert_nil assigns(:uses_tiny_mce)
|
56
|
+
assert_nil assigns(:tiny_mce_configurations)
|
57
|
+
end
|
58
|
+
end
|