contentment 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +15 -0
- data/config/routes.rb +18 -0
- data/lib/contentment.rb +8 -0
- data/lib/contentment/engine.rb +16 -0
- data/lib/extensions/action_controller/base.rb +5 -0
- data/lib/generators/contentment/contentment_views_templates/contents/_preview.html.erb +9 -0
- data/lib/generators/contentment/contentment_views_templates/contents/edit.html.erb +56 -0
- data/lib/generators/contentment/contentment_views_templates/contents/index.html.erb +28 -0
- data/lib/generators/contentment/contentment_views_templates/contents/new.html.erb +37 -0
- data/lib/generators/contentment/contentment_views_templates/contents/show.html.erb +22 -0
- data/lib/generators/contentment/templates/content.rb +48 -0
- data/lib/generators/contentment/templates/contents_controller.rb +58 -0
- data/lib/generators/contentment/templates/migration.rb +24 -0
- data/lib/generators/contentment_generator.rb +46 -0
- data/lib/generators/contentment_views_generator.rb +15 -0
- data/public/javascripts/tiny_mce/langs/en.js +169 -0
- data/public/javascripts/tiny_mce/license.txt +504 -0
- data/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/public/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
- data/public/javascripts/tiny_mce/plugins/advhr/rule.htm +62 -0
- data/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/public/javascripts/tiny_mce/plugins/advimage/image.htm +237 -0
- data/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/advimage/js/image.js +443 -0
- data/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
- data/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +528 -0
- data/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
- data/public/javascripts/tiny_mce/plugins/advlink/link.htm +338 -0
- data/public/javascripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
- data/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +117 -0
- data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +422 -0
- data/public/javascripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +127 -0
- data/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +40 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/public/javascripts/tiny_mce/plugins/example/dialog.htm +27 -0
- data/public/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/public/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/public/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
- data/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +149 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +576 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +471 -0
- data/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +148 -0
- data/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -0
- data/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +212 -0
- data/public/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +133 -0
- data/public/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
- data/public/javascripts/tiny_mce/plugins/media/css/media.css +16 -0
- data/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +414 -0
- data/public/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
- data/public/javascripts/tiny_mce/plugins/media/js/media.js +630 -0
- data/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
- data/public/javascripts/tiny_mce/plugins/media/media.htm +822 -0
- data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +90 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css +1 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +77 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +929 -0
- data/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +33 -0
- data/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +27 -0
- data/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/public/javascripts/tiny_mce/plugins/preview/example.html +28 -0
- data/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/public/javascripts/tiny_mce/plugins/preview/preview.html +17 -0
- data/public/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +57 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +126 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +104 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +341 -0
- data/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/public/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
- data/public/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/public/javascripts/tiny_mce/plugins/style/js/props.js +641 -0
- data/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
- data/public/javascripts/tiny_mce/plugins/style/props.htm +730 -0
- data/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +112 -0
- data/public/javascripts/tiny_mce/plugins/table/cell.htm +183 -0
- data/public/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
- data/public/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
- data/public/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
- data/public/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1118 -0
- data/public/javascripts/tiny_mce/plugins/table/js/cell.js +269 -0
- data/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/public/javascripts/tiny_mce/plugins/table/js/row.js +212 -0
- data/public/javascripts/tiny_mce/plugins/table/js/table.js +449 -0
- data/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/public/javascripts/tiny_mce/plugins/table/merge_cells.htm +37 -0
- data/public/javascripts/tiny_mce/plugins/table/row.htm +160 -0
- data/public/javascripts/tiny_mce/plugins/table/table.htm +192 -0
- data/public/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
- data/public/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
- data/public/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/public/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
- data/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/public/javascripts/tiny_mce/plugins/template/template.htm +38 -0
- data/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +76 -0
- data/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +148 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +148 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +153 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +148 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +169 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +139 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +169 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +126 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +63 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +234 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +62 -0
- data/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/public/javascripts/tiny_mce/themes/advanced/about.htm +56 -0
- data/public/javascripts/tiny_mce/themes/advanced/anchor.htm +31 -0
- data/public/javascripts/tiny_mce/themes/advanced/charmap.htm +53 -0
- data/public/javascripts/tiny_mce/themes/advanced/color_picker.htm +75 -0
- data/public/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/public/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1209 -0
- data/public/javascripts/tiny_mce/themes/advanced/image.htm +85 -0
- data/public/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/about.js +72 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/image.js +245 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/link.js +156 -0
- data/public/javascripts/tiny_mce/themes/advanced/js/source_editor.js +62 -0
- data/public/javascripts/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/public/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/public/javascripts/tiny_mce/themes/advanced/link.htm +63 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/content.css +36 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +116 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +215 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +35 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +115 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +216 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/public/javascripts/tiny_mce/themes/advanced/source_editor.htm +31 -0
- data/public/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
- data/public/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
- data/public/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/public/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/public/javascripts/tiny_mce/tiny_mce.js +1 -0
- data/public/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
- data/public/javascripts/tiny_mce/tiny_mce_src.js +13771 -0
- data/public/javascripts/tiny_mce/utils/editable_selects.js +70 -0
- data/public/javascripts/tiny_mce/utils/form_utils.js +200 -0
- data/public/javascripts/tiny_mce/utils/mctabs.js +77 -0
- data/public/javascripts/tiny_mce/utils/validate.js +220 -0
- metadata +322 -0
@@ -0,0 +1 @@
|
|
1
|
+
(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/ /gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();
|
@@ -0,0 +1,120 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
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
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
tinymce.create('tinymce.plugins.BBCodePlugin', {
|
13
|
+
init : function(ed, url) {
|
14
|
+
var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
|
15
|
+
|
16
|
+
ed.onBeforeSetContent.add(function(ed, o) {
|
17
|
+
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
18
|
+
});
|
19
|
+
|
20
|
+
ed.onPostProcess.add(function(ed, o) {
|
21
|
+
if (o.set)
|
22
|
+
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
23
|
+
|
24
|
+
if (o.get)
|
25
|
+
o.content = t['_' + dialect + '_html2bbcode'](o.content);
|
26
|
+
});
|
27
|
+
},
|
28
|
+
|
29
|
+
getInfo : function() {
|
30
|
+
return {
|
31
|
+
longname : 'BBCode Plugin',
|
32
|
+
author : 'Moxiecode Systems AB',
|
33
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
34
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',
|
35
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
36
|
+
};
|
37
|
+
},
|
38
|
+
|
39
|
+
// Private methods
|
40
|
+
|
41
|
+
// HTML -> BBCode in PunBB dialect
|
42
|
+
_punbb_html2bbcode : function(s) {
|
43
|
+
s = tinymce.trim(s);
|
44
|
+
|
45
|
+
function rep(re, str) {
|
46
|
+
s = s.replace(re, str);
|
47
|
+
};
|
48
|
+
|
49
|
+
// example: <strong> to [b]
|
50
|
+
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
|
51
|
+
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
|
52
|
+
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
|
53
|
+
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
|
54
|
+
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
|
55
|
+
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
56
|
+
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");
|
57
|
+
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
58
|
+
rep(/<font>(.*?)<\/font>/gi,"$1");
|
59
|
+
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
|
60
|
+
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");
|
61
|
+
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");
|
62
|
+
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");
|
63
|
+
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");
|
64
|
+
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");
|
65
|
+
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");
|
66
|
+
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");
|
67
|
+
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");
|
68
|
+
rep(/<\/(strong|b)>/gi,"[/b]");
|
69
|
+
rep(/<(strong|b)>/gi,"[b]");
|
70
|
+
rep(/<\/(em|i)>/gi,"[/i]");
|
71
|
+
rep(/<(em|i)>/gi,"[i]");
|
72
|
+
rep(/<\/u>/gi,"[/u]");
|
73
|
+
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
|
74
|
+
rep(/<u>/gi,"[u]");
|
75
|
+
rep(/<blockquote[^>]*>/gi,"[quote]");
|
76
|
+
rep(/<\/blockquote>/gi,"[/quote]");
|
77
|
+
rep(/<br \/>/gi,"\n");
|
78
|
+
rep(/<br\/>/gi,"\n");
|
79
|
+
rep(/<br>/gi,"\n");
|
80
|
+
rep(/<p>/gi,"");
|
81
|
+
rep(/<\/p>/gi,"\n");
|
82
|
+
rep(/ /gi," ");
|
83
|
+
rep(/"/gi,"\"");
|
84
|
+
rep(/</gi,"<");
|
85
|
+
rep(/>/gi,">");
|
86
|
+
rep(/&/gi,"&");
|
87
|
+
|
88
|
+
return s;
|
89
|
+
},
|
90
|
+
|
91
|
+
// BBCode -> HTML from PunBB dialect
|
92
|
+
_punbb_bbcode2html : function(s) {
|
93
|
+
s = tinymce.trim(s);
|
94
|
+
|
95
|
+
function rep(re, str) {
|
96
|
+
s = s.replace(re, str);
|
97
|
+
};
|
98
|
+
|
99
|
+
// example: [b] to <strong>
|
100
|
+
rep(/\n/gi,"<br />");
|
101
|
+
rep(/\[b\]/gi,"<strong>");
|
102
|
+
rep(/\[\/b\]/gi,"</strong>");
|
103
|
+
rep(/\[i\]/gi,"<em>");
|
104
|
+
rep(/\[\/i\]/gi,"</em>");
|
105
|
+
rep(/\[u\]/gi,"<u>");
|
106
|
+
rep(/\[\/u\]/gi,"</u>");
|
107
|
+
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
108
|
+
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
|
109
|
+
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
|
110
|
+
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");
|
111
|
+
rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span> ");
|
112
|
+
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span> ");
|
113
|
+
|
114
|
+
return s;
|
115
|
+
}
|
116
|
+
});
|
117
|
+
|
118
|
+
// Register plugin
|
119
|
+
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
|
120
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(d){var f=this;f.editor=d;f.onContextMenu=new tinymce.util.Dispatcher(this);d.onContextMenu.add(function(g,h){if(!h.ctrlKey){f._getMenu(g).showMenu(h.clientX,h.clientY);a.add(g.getDoc(),"click",e);a.cancel(h)}});function e(){if(f._menu){f._menu.removeAll();f._menu.destroy();a.remove(d.getDoc(),"click",e)}}d.onMouseDown.add(e);d.onKeyDown.add(e)},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(h){var l=this,f=l._menu,i=h.selection,e=i.isCollapsed(),d=i.getNode()||h.getBody(),g,k,j;if(f){f.removeAll();f.destroy()}k=b.getPos(h.getContentAreaContainer());j=b.getPos(h.getContainer());f=h.controlManager.createDropMenu("contextmenu",{offset_x:k.x+h.getParam("contextmenu_offset_x",0),offset_y:k.y+h.getParam("contextmenu_offset_y",0),constrain:1});l._menu=f;f.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(e);f.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(e);f.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((d.nodeName=="A"&&!h.dom.getAttrib(d,"name"))||!e){f.addSeparator();f.add({title:"advanced.link_desc",icon:"link",cmd:h.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}f.addSeparator();f.add({title:"advanced.image_desc",icon:"image",cmd:h.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator();g=f.addMenu({title:"contextmenu.align"});g.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});g.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});g.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});g.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});l.onContextMenu.dispatch(l,f,d,e);return f}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
|
@@ -0,0 +1,127 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
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
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM;
|
13
|
+
|
14
|
+
/**
|
15
|
+
* This plugin a context menu to TinyMCE editor instances.
|
16
|
+
*
|
17
|
+
* @class tinymce.plugins.ContextMenu
|
18
|
+
*/
|
19
|
+
tinymce.create('tinymce.plugins.ContextMenu', {
|
20
|
+
/**
|
21
|
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
22
|
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
23
|
+
* of the editor instance to intercept that event.
|
24
|
+
*
|
25
|
+
* @method init
|
26
|
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
27
|
+
* @param {string} url Absolute URL to where the plugin is located.
|
28
|
+
*/
|
29
|
+
init : function(ed) {
|
30
|
+
var t = this;
|
31
|
+
|
32
|
+
t.editor = ed;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* This event gets fired when the context menu is shown.
|
36
|
+
*
|
37
|
+
* @event onContextMenu
|
38
|
+
* @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event.
|
39
|
+
* @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed.
|
40
|
+
*/
|
41
|
+
t.onContextMenu = new tinymce.util.Dispatcher(this);
|
42
|
+
|
43
|
+
ed.onContextMenu.add(function(ed, e) {
|
44
|
+
if (!e.ctrlKey) {
|
45
|
+
t._getMenu(ed).showMenu(e.clientX, e.clientY);
|
46
|
+
Event.add(ed.getDoc(), 'click', hide);
|
47
|
+
Event.cancel(e);
|
48
|
+
}
|
49
|
+
});
|
50
|
+
|
51
|
+
function hide() {
|
52
|
+
if (t._menu) {
|
53
|
+
t._menu.removeAll();
|
54
|
+
t._menu.destroy();
|
55
|
+
Event.remove(ed.getDoc(), 'click', hide);
|
56
|
+
}
|
57
|
+
};
|
58
|
+
|
59
|
+
ed.onMouseDown.add(hide);
|
60
|
+
ed.onKeyDown.add(hide);
|
61
|
+
},
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Returns information about the plugin as a name/value array.
|
65
|
+
* The current keys are longname, author, authorurl, infourl and version.
|
66
|
+
*
|
67
|
+
* @method getInfo
|
68
|
+
* @return {Object} Name/value array containing information about the plugin.
|
69
|
+
*/
|
70
|
+
getInfo : function() {
|
71
|
+
return {
|
72
|
+
longname : 'Contextmenu',
|
73
|
+
author : 'Moxiecode Systems AB',
|
74
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
75
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
|
76
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
77
|
+
};
|
78
|
+
},
|
79
|
+
|
80
|
+
_getMenu : function(ed) {
|
81
|
+
var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p1, p2;
|
82
|
+
|
83
|
+
if (m) {
|
84
|
+
m.removeAll();
|
85
|
+
m.destroy();
|
86
|
+
}
|
87
|
+
|
88
|
+
p1 = DOM.getPos(ed.getContentAreaContainer());
|
89
|
+
p2 = DOM.getPos(ed.getContainer());
|
90
|
+
|
91
|
+
m = ed.controlManager.createDropMenu('contextmenu', {
|
92
|
+
offset_x : p1.x + ed.getParam('contextmenu_offset_x', 0),
|
93
|
+
offset_y : p1.y + ed.getParam('contextmenu_offset_y', 0),
|
94
|
+
constrain : 1
|
95
|
+
});
|
96
|
+
|
97
|
+
t._menu = m;
|
98
|
+
|
99
|
+
m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col);
|
100
|
+
m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col);
|
101
|
+
m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'});
|
102
|
+
|
103
|
+
if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) {
|
104
|
+
m.addSeparator();
|
105
|
+
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
|
106
|
+
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
|
107
|
+
}
|
108
|
+
|
109
|
+
m.addSeparator();
|
110
|
+
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
|
111
|
+
|
112
|
+
m.addSeparator();
|
113
|
+
am = m.addMenu({title : 'contextmenu.align'});
|
114
|
+
am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'});
|
115
|
+
am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'});
|
116
|
+
am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'});
|
117
|
+
am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'});
|
118
|
+
|
119
|
+
t.onContextMenu.dispatch(t, m, el, col);
|
120
|
+
|
121
|
+
return m;
|
122
|
+
}
|
123
|
+
});
|
124
|
+
|
125
|
+
// Register plugin
|
126
|
+
tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu);
|
127
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
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
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
tinymce.create('tinymce.plugins.Directionality', {
|
13
|
+
init : function(ed, url) {
|
14
|
+
var t = this;
|
15
|
+
|
16
|
+
t.editor = ed;
|
17
|
+
|
18
|
+
ed.addCommand('mceDirectionLTR', function() {
|
19
|
+
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
20
|
+
|
21
|
+
if (e) {
|
22
|
+
if (ed.dom.getAttrib(e, "dir") != "ltr")
|
23
|
+
ed.dom.setAttrib(e, "dir", "ltr");
|
24
|
+
else
|
25
|
+
ed.dom.setAttrib(e, "dir", "");
|
26
|
+
}
|
27
|
+
|
28
|
+
ed.nodeChanged();
|
29
|
+
});
|
30
|
+
|
31
|
+
ed.addCommand('mceDirectionRTL', function() {
|
32
|
+
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
33
|
+
|
34
|
+
if (e) {
|
35
|
+
if (ed.dom.getAttrib(e, "dir") != "rtl")
|
36
|
+
ed.dom.setAttrib(e, "dir", "rtl");
|
37
|
+
else
|
38
|
+
ed.dom.setAttrib(e, "dir", "");
|
39
|
+
}
|
40
|
+
|
41
|
+
ed.nodeChanged();
|
42
|
+
});
|
43
|
+
|
44
|
+
ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
|
45
|
+
ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
|
46
|
+
|
47
|
+
ed.onNodeChange.add(t._nodeChange, t);
|
48
|
+
},
|
49
|
+
|
50
|
+
getInfo : function() {
|
51
|
+
return {
|
52
|
+
longname : 'Directionality',
|
53
|
+
author : 'Moxiecode Systems AB',
|
54
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
55
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
|
56
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
57
|
+
};
|
58
|
+
},
|
59
|
+
|
60
|
+
// Private methods
|
61
|
+
|
62
|
+
_nodeChange : function(ed, cm, n) {
|
63
|
+
var dom = ed.dom, dir;
|
64
|
+
|
65
|
+
n = dom.getParent(n, dom.isBlock);
|
66
|
+
if (!n) {
|
67
|
+
cm.setDisabled('ltr', 1);
|
68
|
+
cm.setDisabled('rtl', 1);
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
|
72
|
+
dir = dom.getAttrib(n, 'dir');
|
73
|
+
cm.setActive('ltr', dir == "ltr");
|
74
|
+
cm.setDisabled('ltr', 0);
|
75
|
+
cm.setActive('rtl', dir == "rtl");
|
76
|
+
cm.setDisabled('rtl', 0);
|
77
|
+
}
|
78
|
+
});
|
79
|
+
|
80
|
+
// Register plugin
|
81
|
+
tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
|
82
|
+
})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce);
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
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
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function(tinymce) {
|
12
|
+
tinymce.create('tinymce.plugins.EmotionsPlugin', {
|
13
|
+
init : function(ed, url) {
|
14
|
+
// Register commands
|
15
|
+
ed.addCommand('mceEmotion', function() {
|
16
|
+
ed.windowManager.open({
|
17
|
+
file : url + '/emotions.htm',
|
18
|
+
width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
|
19
|
+
height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
|
20
|
+
inline : 1
|
21
|
+
}, {
|
22
|
+
plugin_url : url
|
23
|
+
});
|
24
|
+
});
|
25
|
+
|
26
|
+
// Register buttons
|
27
|
+
ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
|
28
|
+
},
|
29
|
+
|
30
|
+
getInfo : function() {
|
31
|
+
return {
|
32
|
+
longname : 'Emotions',
|
33
|
+
author : 'Moxiecode Systems AB',
|
34
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
35
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
|
36
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
37
|
+
};
|
38
|
+
}
|
39
|
+
});
|
40
|
+
|
41
|
+
// Register plugin
|
42
|
+
tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
|
43
|
+
})(tinymce);
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>{#emotions_dlg.title}</title>
|
5
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6
|
+
<script type="text/javascript" src="js/emotions.js"></script>
|
7
|
+
</head>
|
8
|
+
<body style="display: none">
|
9
|
+
<div align="center">
|
10
|
+
<div class="title">{#emotions_dlg.title}:<br /><br /></div>
|
11
|
+
|
12
|
+
<table border="0" cellspacing="0" cellpadding="4">
|
13
|
+
<tr>
|
14
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-cool.gif','emotions_dlg.cool');"><img src="img/smiley-cool.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cool}" title="{#emotions_dlg.cool}" /></a></td>
|
15
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-cry.gif','emotions_dlg.cry');"><img src="img/smiley-cry.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cry}" title="{#emotions_dlg.cry}" /></a></td>
|
16
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-embarassed.gif','emotions_dlg.embarassed');"><img src="img/smiley-embarassed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.embarassed}" title="{#emotions_dlg.embarassed}" /></a></td>
|
17
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-foot-in-mouth.gif','emotions_dlg.foot_in_mouth');"><img src="img/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.foot_in_mouth}" title="{#emotions_dlg.foot_in_mouth}" /></a></td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-frown.gif','emotions_dlg.frown');"><img src="img/smiley-frown.gif" width="18" height="18" border="0" alt="{#emotions_dlg.frown}" title="{#emotions_dlg.frown}" /></a></td>
|
21
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-innocent.gif','emotions_dlg.innocent');"><img src="img/smiley-innocent.gif" width="18" height="18" border="0" alt="{#emotions_dlg.innocent}" title="{#emotions_dlg.innocent}" /></a></td>
|
22
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-kiss.gif','emotions_dlg.kiss');"><img src="img/smiley-kiss.gif" width="18" height="18" border="0" alt="{#emotions_dlg.kiss}" title="{#emotions_dlg.kiss}" /></a></td>
|
23
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-laughing.gif','emotions_dlg.laughing');"><img src="img/smiley-laughing.gif" width="18" height="18" border="0" alt="{#emotions_dlg.laughing}" title="{#emotions_dlg.laughing}" /></a></td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-money-mouth.gif','emotions_dlg.money_mouth');"><img src="img/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.money_mouth}" title="{#emotions_dlg.money_mouth}" /></a></td>
|
27
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-sealed.gif','emotions_dlg.sealed');"><img src="img/smiley-sealed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.sealed}" title="{#emotions_dlg.sealed}" /></a></td>
|
28
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-smile.gif','emotions_dlg.smile');"><img src="img/smiley-smile.gif" width="18" height="18" border="0" alt="{#emotions_dlg.smile}" title="{#emotions_dlg.smile}" /></a></td>
|
29
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-surprised.gif','emotions_dlg.surprised');"><img src="img/smiley-surprised.gif" width="18" height="18" border="0" alt="{#emotions_dlg.surprised}" title="{#emotions_dlg.surprised}" /></a></td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-tongue-out.gif','emotions_dlg.tongue_out');"><img src="img/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{#emotions_dlg.tongue-out}" title="{#emotions_dlg.tongue_out}" /></a></td>
|
33
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-undecided.gif','emotions_dlg.undecided');"><img src="img/smiley-undecided.gif" width="18" height="18" border="0" alt="{#emotions_dlg.undecided}" title="{#emotions_dlg.undecided}" /></a></td>
|
34
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-wink.gif','emotions_dlg.wink');"><img src="img/smiley-wink.gif" width="18" height="18" border="0" alt="{#emotions_dlg.wink}" title="{#emotions_dlg.wink}" /></a></td>
|
35
|
+
<td><a href="javascript:EmotionsDialog.insert('smiley-yell.gif','emotions_dlg.yell');"><img src="img/smiley-yell.gif" width="18" height="18" border="0" alt="{#emotions_dlg.yell}" title="{#emotions_dlg.yell}" /></a></td>
|
36
|
+
</tr>
|
37
|
+
</table>
|
38
|
+
</div>
|
39
|
+
</body>
|
40
|
+
</html>
|
Binary file
|
Binary file
|
Binary file
|