Changeset 3777
- Timestamp:
- 04/30/09 09:13:24 (3 years ago)
- Location:
- trunk/TinyMCEPlugin
- Files:
-
- 5 added
- 8 edited
-
data/System/TinyMCEPlugin.txt (modified) (2 diffs)
-
data/System/TinyMCEQuickHelp.txt (modified) (3 diffs)
-
lib/Foswiki/Plugins/TinyMCEPlugin.pm (modified) (4 diffs)
-
pub/System/TinyMCEPlugin/anchor.gif (added)
-
pub/System/TinyMCEPlugin/foswiki_tiny.js (modified) (1 diff)
-
pub/System/TinyMCEPlugin/indent.gif (added)
-
pub/System/TinyMCEPlugin/link.gif (added)
-
pub/System/TinyMCEPlugin/outdent.gif (added)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin.js (modified) (1 diff)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin_src.js (modified) (2 diffs)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikiimage/editor_plugin.js (modified) (1 diff)
-
pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikiimage/editor_plugin_src.js (modified) (1 diff)
-
pub/System/TinyMCEPlugin/unlink.gif (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/TinyMCEPlugin/data/System/TinyMCEPlugin.txt
r3369 r3777 41 41 guidance on reconfiguring Tiny MCE, see the [[http://wiki.moxiecode.com/index.php/TinyMCE:Configuration][Moxicode TinyMCE Wiki]]. The default options are as follows. Note the inclusion of the Pattern Skin standard CSS files in the 42 42 =content_css= setting. 43 <verbatim> * Set TINYMCEPLUGIN_INIT = mode:"textareas",44 editor_selector : "foswikiWysiwygEdit",45 save_on_tinymce_forms: true,46 cleanup: true,47 theme : "advanced",48 convert_urls : true,49 relative_urls : false,50 remove_script_host: false,51 dialog_type: "modal",52 setupcontent_callback : FoswikiTiny.setUpContent,53 urlconverter_callback : "FoswikiTiny.convertLink",54 foswikipuburl_callback : "FoswikiTiny.convertPubURL",55 save_callback : "FoswikiTiny.saveCallback",56 %IF{"$TINYMCEPLUGIN_DEBUG" then="debug:true,"}% 57 plugins : "table,searchreplace,autosave,paste,foswikibuttons,foswikiimage%IF{ "context TinyMCEUsabilityUpgradePluginEnabled" then=",foswikilink" else=""}%", 58 foswiki_secret_id : "%WYSIWYG_SECRET_ID%",59 foswiki_vars : { PUBURLPATH : "%PUBURLPATH%", PUBURL : "%PUBURL%", WEB : "%WEB%", TOPIC : "%TOPIC%", ATTACHURL : "%ATTACHURL%", ATTACHURLPATH : "%ATTACHURLPATH%", VIEWSCRIPTURL : "%SCRIPTURL{view}%", SCRIPTSUFFIX: "%SCRIPTSUFFIX%", SCRIPTURL : "%SCRIPTURL%", SYSTEMWEB: "%SYSTEMWEB%" },60 theme_advanced_toolbar_align : "left",61 foswikibuttons_formats : [ 62 { name: "Normal", el: "", style: null }, 63 { name: "Heading 1", el: "h1", style: false},64 { name: "Heading 2", el: "h2", style: false },65 { name: "Heading 3", el: "h3", style: false },66 { name: "Heading 4", el: "h4", style: false },67 { name: "Heading 5", el: "h5", style: false },68 { name: "Heading 6", el: "h6", style: false },69 { name: "VERBATIM", el: "pre", style: "TMLverbatim"},70 { name: "LITERAL", el: "span", style: "WYSIWYG_LITERAL" },71 { name: "Protect on save", el: null, style: "WYSIWYG_PROTECTED" },72 { name: "Protect forever", el: null, style: "WYSIWYG_STICKY" } 73 ], 74 paste_create_paragraphs : true,75 paste_create_linebreaks : false,76 paste_convert_middot_lists : true,77 paste_convert_headers_to_strong : false,78 paste_remove_spans: true,79 paste_remove_styles: true,80 paste_strip_class_attributes: "all",81 theme_advanced_buttons1 : "foswikiformat,separator,bold,italic,tt,colour,removeformat,separator,bullist,numlist,outdent,indent,separator,link,unlink,anchor,separator,attach,image,charmap,hr,separator,undo,redo,separator,search,replace",82 theme_advanced_buttons2: "tablecontrols,separator,code,hide",83 theme_advanced_buttons3: "",84 theme_advanced_toolbar_location: "top",85 theme_advanced_resize_horizontal : false,86 theme_advanced_resizing : true,87 theme_advanced_path: false,88 theme_advanced_statusbar_location : "bottom",89 keep_styles : false,90 gecko_spellcheck : true,91 content_css : "%PUBURLPATH%/%SYSTEMWEB%/TinyMCEPlugin/wysiwyg%IF{"$TINYMCEPLUGIN_DEBUG" then="_src"}%.css,%PUBURLPATH%/%SYSTEMWEB%/SkinTemplates/base.css,%FOSWIKI_STYLE_URL%,%FOSWIKI_COLORS_URL%"43 <verbatim> 44 mode:"textareas", 45 editor_selector : "foswikiWysiwygEdit", 46 save_on_tinymce_forms: true, 47 cleanup : true, 48 theme : "advanced", 49 convert_urls : true, 50 relative_urls : false, 51 remove_script_host : false, 52 dialog_type: "modal", 53 setupcontent_callback : FoswikiTiny.setUpContent, 54 urlconverter_callback : "FoswikiTiny.convertLink", 55 foswikipuburl_callback : "FoswikiTiny.convertPubURL", 56 save_callback : "FoswikiTiny.saveCallback", 57 %IF{"$TINYMCEPLUGIN_DEBUG" then="debug:true,"}% 58 plugins : "table,searchreplace,autosave,paste,safari,inlinepopups,fullscreen,foswikibuttons,foswikiimage%IF{ "context TinyMCEUsabilityUpgradePluginEnabled" then=",foswikilink" else=""}%", 59 foswiki_secret_id : "%WYSIWYG_SECRET_ID%", 60 foswiki_vars : { PUBURLPATH : "%PUBURLPATH%", PUBURL : "%PUBURL%", WEB : "%WEB%", TOPIC : "%TOPIC%", ATTACHURL : "%ATTACHURL%", ATTACHURLPATH : "%ATTACHURLPATH%", VIEWSCRIPTURL : "%SCRIPTURL{view}%", SCRIPTSUFFIX: "%SCRIPTSUFFIX%", SCRIPTURL : "%SCRIPTURL%", SYSTEMWEB: "%SYSTEMWEB%" }, 61 theme_advanced_toolbar_align : "left", 62 foswikibuttons_formats : [ 63 { name: "Normal", el: "", style: null }, 64 { name: "Heading 1", el: "h1", style: false }, 65 { name: "Heading 2", el: "h2", style: false }, 66 { name: "Heading 3", el: "h3", style: false }, 67 { name: "Heading 4", el: "h4", style: false }, 68 { name: "Heading 5", el: "h5", style: false }, 69 { name: "Heading 6", el: "h6", style: false }, 70 { name: "VERBATIM", el: "pre", style: "TMLverbatim" }, 71 { name: "LITERAL", el: "span", style: "WYSIWYG_LITERAL" }, 72 { name: "Protect on save", el: null, style: "WYSIWYG_PROTECTED" }, 73 { name: "Protect forever", el: null, style: "WYSIWYG_STICKY" } 74 ], 75 paste_create_paragraphs : true, 76 paste_create_linebreaks : false, 77 paste_convert_middot_lists : true, 78 paste_convert_headers_to_strong : false, 79 paste_remove_spans: true, 80 paste_remove_styles: true, 81 paste_strip_class_attributes: "all", 82 theme_advanced_buttons1 : "foswikiformat,separator,bold,italic,tt,colour,removeformat,separator,bullist,numlist,outdent,indent,separator,link,unlink,anchor,separator,attach,image,charmap,hr,separator,undo,redo,separator,search,replace", 83 theme_advanced_buttons2: "tablecontrols,separator,code,hide,fullscreen", 84 theme_advanced_buttons3: "", 85 theme_advanced_toolbar_location: "top", 86 theme_advanced_resize_horizontal : false, 87 theme_advanced_resizing : true, 88 theme_advanced_path: false, 89 theme_advanced_statusbar_location : "bottom", 90 keep_styles : false, 91 content_css : "%PUBURLPATH%/%SYSTEMWEB%/TinyMCEPlugin/wysiwyg%IF{"$TINYMCEPLUGIN_DEBUG" then="_src"}%.css,%PUBURLPATH%/%SYSTEMWEB%/SkinTemplates/base.css,%FOSWIKI_STYLE_URL%,%FOSWIKI_COLORS_URL%" 92 92 </verbatim> 93 93 You can set additional options for specific browsers. You can define extra options for MSIE, OPERA, GECKO and SAFARI. For example, 94 94 <verbatim> * Set TINYMCEPLUGIN_INIT_MSIE = paste_auto_cleanup_on_paste : true 95 </verbatim> 96 The defaults are: 97 <verbatim> 98 MSIE => 'paste_auto_cleanup_on_paste : true', 99 OPERA => '', 100 GECKO => 'gecko_spellcheck : true', 101 SAFARI => '', 95 102 </verbatim> 96 103 * Warning: if you enable =paste_auto_cleanup_on_paste then it automatically implies =paste_use_dialog= on all non-MSIE browsers. … … 123 130 | Plugin Version: | %$VERSION% | 124 131 | Change History: | <!-- versions below in reverse order --> | 132 | 10 Apr 2009 | Foswikitask:Item1394: fixed colour handling Foswikitask:Item8108: added safari,inlinepopups,fullscreen plugins, fixed some minor bugs on IE | 125 133 | 3 Apr 2009 | Foswikitask:Item1383: Optimised the preferences Foswikitask:Item8094: fixed the pickaxe | 126 134 | 15 Mar 2009 | Foswikitask:Item930: Crawford Currie upgraded to Tiny MCE 3.2.2 and recoded all the standard plugins that had to be recoded | -
trunk/TinyMCEPlugin/data/System/TinyMCEQuickHelp.txt
r3231 r3777 43 43 </tr> 44 44 <tr> 45 <td class="imgcolumn"><img src="%PUBURL%/%WEB%/TinyMCEPlugin/ tinymce/jscripts/tiny_mce/themes/advanced/images/indent.gif" alt="indent" />46 <img src="%PUBURL%/%WEB%/TinyMCEPlugin/ tinymce/jscripts/tiny_mce/themes/advanced/images/outdent.gif" alt="outdent" /></td>45 <td class="imgcolumn"><img src="%PUBURL%/%WEB%/TinyMCEPlugin/indent.gif" alt="indent" /> 46 <img src="%PUBURL%/%WEB%/TinyMCEPlugin/outdent.gif" alt="outdent" /></td> 47 47 <td class="textcolumn"><ul> 48 48 <li> If the cursor is in a list item, changes the indent. Otherwise marks text with <blockquote> tags.</li> … … 50 50 </tr> 51 51 <tr> 52 <td class="imgcolumn"><img src="%PUBURL%/%WEB%/TinyMCEPlugin/ tinymce/jscripts/tiny_mce/themes/advanced/images/link.gif" alt="link" />53 <img src="%PUBURL%/%WEB%/TinyMCEPlugin/ tinymce/jscripts/tiny_mce/themes/advanced/images/unlink.gif" alt="unlink" /></td>52 <td class="imgcolumn"><img src="%PUBURL%/%WEB%/TinyMCEPlugin/link.gif" alt="link" /> 53 <img src="%PUBURL%/%WEB%/TinyMCEPlugin/unlink.gif" alt="unlink" /></td> 54 54 <td class="textcolumn"><ul> 55 55 <li> Links can either point to a URL or to the name of a Foswiki topic. For example =http://foswiki.org=, =TopicNames=, =Webname.TopicNames=, or =Webname.Subweb.WebName=.</li> … … 57 57 </tr> 58 58 <tr> 59 <td class="imgcolumn"><img src="%PUBURL%/%WEB%/TinyMCEPlugin/ tinymce/jscripts/tiny_mce/themes/advanced/images/anchor.gif" alt="anchor" /></td>59 <td class="imgcolumn"><img src="%PUBURL%/%WEB%/TinyMCEPlugin/anchor.gif" alt="anchor" /></td> 60 60 <td class="textcolumn"><ul> 61 61 <li> An anchor is a hidden mark you can use to link to a certain part of a topic, for example a heading or a paragraph. An anchor must be a !WikiWord. </li> -
trunk/TinyMCEPlugin/lib/Foswiki/Plugins/TinyMCEPlugin.pm
r3369 r3777 41 41 save_callback : "FoswikiTiny.saveCallback", 42 42 %IF{"$TINYMCEPLUGIN_DEBUG" then="debug:true,"}% 43 plugins : "table,searchreplace,autosave,paste, foswikibuttons,foswikiimage%IF{ "context TinyMCEUsabilityUpgradePluginEnabled" then=",foswikilink" else=""}%",43 plugins : "table,searchreplace,autosave,paste,safari,inlinepopups,fullscreen,foswikibuttons,foswikiimage%IF{ "context TinyMCEUsabilityUpgradePluginEnabled" then=",foswikilink" else=""}%", 44 44 foswiki_secret_id : "%WYSIWYG_SECRET_ID%", 45 45 foswiki_vars : { PUBURLPATH : "%PUBURLPATH%", PUBURL : "%PUBURL%", WEB : "%WEB%", TOPIC : "%TOPIC%", ATTACHURL : "%ATTACHURL%", ATTACHURLPATH : "%ATTACHURLPATH%", VIEWSCRIPTURL : "%SCRIPTURL{view}%", SCRIPTSUFFIX: "%SCRIPTSUFFIX%", SCRIPTURL : "%SCRIPTURL%", SYSTEMWEB: "%SYSTEMWEB%" }, … … 66 66 paste_strip_class_attributes: "all", 67 67 theme_advanced_buttons1 : "foswikiformat,separator,bold,italic,tt,colour,removeformat,separator,bullist,numlist,outdent,indent,separator,link,unlink,anchor,separator,attach,image,charmap,hr,separator,undo,redo,separator,search,replace", 68 theme_advanced_buttons2: "tablecontrols,separator,code,hide ",68 theme_advanced_buttons2: "tablecontrols,separator,code,hide,fullscreen", 69 69 theme_advanced_buttons3: "", 70 70 theme_advanced_toolbar_location: "top", … … 74 74 theme_advanced_statusbar_location : "bottom", 75 75 keep_styles : false, 76 gecko_spellcheck : true,77 76 content_css : "%PUBURLPATH%/%SYSTEMWEB%/TinyMCEPlugin/wysiwyg%IF{"$TINYMCEPLUGIN_DEBUG" then="_src"}%.css,%PUBURLPATH%/%SYSTEMWEB%/SkinTemplates/base.css,%FOSWIKI_STYLE_URL%,%FOSWIKI_COLORS_URL%" 78 77 HERE … … 80 79 MSIE => 'paste_auto_cleanup_on_paste : true', 81 80 OPERA => '', 82 GECKO => ' ',81 GECKO => 'gecko_spellcheck : true', 83 82 SAFARI => '', 84 83 ); 85 84 86 use Foswiki::Func ;85 use Foswiki::Func (); 87 86 88 87 my $query; -
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/foswiki_tiny.js
r3105 r3777 1 1 var FoswikiTiny={foswikiVars:null,metaTags:null,tml2html:new Array(),html2tml:new Array(),getFoswikiVar:function(name){if(FoswikiTiny.foswikiVars==null){var sets=tinyMCE.activeEditor.getParam("foswiki_vars","");FoswikiTiny.foswikiVars=eval(sets);} 2 2 return FoswikiTiny.foswikiVars[name];},expandVariables:function(url){for(var i in FoswikiTiny.foswikiVars){url=url.replace('%'+i+'%',FoswikiTiny.foswikiVars[i],'g');} 3 return url;},enableSave :function(enabled){var status=enabled?null:"disabled";var elm=document.getElementById("save");if(elm){elm.disabled=status;}3 return url;},enableSaveButton:function(enabled){var status=enabled?null:"disabled";var elm=document.getElementById("save");if(elm){elm.disabled=status;} 4 4 elm=document.getElementById("preview");if(elm){elm.style.display='none';elm.disabled=status;}},transform:function(editor,handler,text,onSuccess,onFail){var url=FoswikiTiny.getFoswikiVar("SCRIPTURL");var suffix=FoswikiTiny.getFoswikiVar("SCRIPTSUFFIX");if(suffix==null)suffix='';url+="/rest"+suffix+"/WysiwygPlugin/"+handler;var path=FoswikiTiny.getFoswikiVar("WEB")+'.' 5 5 +FoswikiTiny.getFoswikiVar("TOPIC");tinymce.util.XHR.send({url:url,content_type:"application/x-www-form-urlencoded",type:"POST",data:"nocache="+encodeURIComponent((new Date()).getTime()) 6 6 +"&topic="+encodeURIComponent(path) 7 +"&text="+encodeURIComponent(text),async:true,scope:editor,success:onSuccess,error:onFail})},initialisedFromServer:false,setUpContent:function(editor_id,body,doc){if(FoswikiTiny.initialisedFromServer)return;var editor=tinyMCE.getInstanceById(editor_id);FoswikiTiny.switchToWYSIWYG(editor);FoswikiTiny.initialisedFromServer=true;}, switchToRaw:function(editor){var text=editor.getContent();for(var i=0;i<FoswikiTiny.html2tml.length;i++){var cb=FoswikiTiny.html2tml[i];text=cb.apply(editor,[editor,text]);}8 FoswikiTiny.enableSave (false);editor.getElement().value="Please wait... retrieving page from server.";FoswikiTiny.transform(editor,"html2tml",text,function(text,req,o){this.getElement().value=text;FoswikiTiny.enableSave(true);},function(type,req,o){this.setContent("<div class='foswikiAlert'>"7 +"&text="+encodeURIComponent(text),async:true,scope:editor,success:onSuccess,error:onFail})},initialisedFromServer:false,setUpContent:function(editor_id,body,doc){if(FoswikiTiny.initialisedFromServer)return;var editor=tinyMCE.getInstanceById(editor_id);FoswikiTiny.switchToWYSIWYG(editor);FoswikiTiny.initialisedFromServer=true;},onSubmitHandler:false,switchToRaw:function(editor){var text=editor.getContent();for(var i=0;i<FoswikiTiny.html2tml.length;i++){var cb=FoswikiTiny.html2tml[i];text=cb.apply(editor,[editor,text]);} 8 FoswikiTiny.enableSaveButton(false);editor.getElement().value="Please wait... retrieving page from server.";FoswikiTiny.transform(editor,"html2tml",text,function(text,req,o){this.getElement().value=text;FoswikiTiny.enableSaveButton(true);},function(type,req,o){this.setContent("<div class='foswikiAlert'>" 9 9 +"There was a problem retrieving " 10 10 +o.url+": " 11 11 +type+" "+req.status+"</div>");});var eid=editor.id;var id=eid+"_2WYSIWYG";var el=document.getElementById(id);if(el){el.style.display="block";}else{el=document.createElement('INPUT');el.id=id;el.type="button";el.value="WYSIWYG";el.className="foswikiButton";el.onclick=function(){tinyMCE.execCommand("mceToggleEditor",null,eid);FoswikiTiny.switchToWYSIWYG(editor);return false;} 12 12 var pel=editor.getElement().parentNode;pel.insertBefore(el,editor.getElement());} 13 editor.getElement().onchange=function(){var editor=tinyMCE.getInstanceById(eid);editor.isNotDirty=false;return true;}},switchToWYSIWYG:function(editor){editor.getElement().onchange=null;var text=editor.getElement().value;FoswikiTiny.enableSave(false);editor.setContent("<span class='foswikiAlert'>" 13 editor.getElement().onchange=function(){var editor=tinyMCE.getInstanceById(eid);editor.isNotDirty=false;return true;},this.onSubmitHandler=function(ed,e){editor.initialized=false;};editor.onSubmit.addToTop(this.onSubmitHandler);},switchToWYSIWYG:function(editor){editor.getElement().onchange=null;var text=editor.getElement().value;if(this.onSubmitHandler){editor.onSubmit.remove(this.onSubmitHandler);this.onSubmitHandler=null;} 14 FoswikiTiny.enableSaveButton(false);editor.setContent("<span class='foswikiAlert'>" 14 15 +"Please wait... retrieving page from server." 15 16 +"</span>");FoswikiTiny.transform(editor,"tml2html",text,function(text,req,o){for(var i=0;i<FoswikiTiny.tml2html.length;i++){var cb=FoswikiTiny.tml2html[i];text=cb.apply(this,[this,text]);} 16 this.setContent(text);this.isNotDirty=true;FoswikiTiny.enableSave (true);},function(type,req,o){this.setContent("<div class='foswikiAlert'>"17 this.setContent(text);this.isNotDirty=true;FoswikiTiny.enableSaveButton(true);},function(type,req,o){this.setContent("<div class='foswikiAlert'>" 17 18 +"There was a problem retrieving " 18 19 +o.url+": " -
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin.js
r3475 r3777 1 1 (function(){tinymce.PluginManager.requireLangPack('foswikibuttons');tinymce.create('tinymce.plugins.FoswikiButtons',{formats_lb:null,init:function(ed,url){ed.fw_formats=ed.getParam("foswikibuttons_formats");ed.fw_lb=null;ed.addCommand('foswikibuttonsTT',function(){if(!ed.selection.isCollapsed()) 2 2 ed.execCommand('mceSetCSSClass',false,"WYSIWYG_TT");});ed.addButton('tt',{title:'foswikibuttons.tt_desc',cmd:'foswikibuttonsTT',image:url+'/img/tt.gif'});ed.addCommand('foswikibuttonsColour',function(){if(ed.selection.isCollapsed()) 3 return;ed.windowManager.open({location:false,menubar:false,toolbar:false,status:false,url:url+'/colours.htm',width:240,height:140,movable:true,popup_css:false,inline:true},{plugin_url:url ,});});ed.addButton('colour',{title:'foswikibuttons.colour_desc',cmd:'foswikibuttonsColour',image:url+'/img/colour.gif'});ed.addCommand('foswikibuttonsAttach',function(){ed.windowManager.open({location:false,menubar:false,toolbar:false,status:false,url:url+'/attach.htm',width:350,height:250,movable:true,inline:true},{plugin_url:url,});});ed.addButton('attach',{title:'foswikibuttons.attach_desc',cmd:'foswikibuttonsAttach',image:url+'/img/attach.gif'});ed.addCommand('foswikibuttonsHide',function(){tinyMCE.execCommand("mceToggleEditor",true,ed.id);FoswikiTiny.switchToRaw(ed);});ed.addButton('hide',{title:'foswikibuttons.hide_desc',cmd:'foswikibuttonsHide',image:url+'/img/hide.gif'});ed.addCommand('foswikibuttonsFormat',function(ui,fn){var format=null;for(var i=0;i<ed.fw_formats.length;i++){if(ed.fw_formats[i].name==fn){format=ed.fw_formats[i];break;}}3 return;ed.windowManager.open({location:false,menubar:false,toolbar:false,status:false,url:url+'/colours.htm',width:240,height:140,movable:true,popup_css:false,inline:true},{plugin_url:url});});ed.addButton('colour',{title:'foswikibuttons.colour_desc',cmd:'foswikibuttonsColour',image:url+'/img/colour.gif'});ed.addCommand('foswikibuttonsAttach',function(){ed.windowManager.open({location:false,menubar:false,toolbar:false,status:false,url:url+'/attach.htm',width:350,height:250,movable:true,inline:true},{plugin_url:url});});ed.addButton('attach',{title:'foswikibuttons.attach_desc',cmd:'foswikibuttonsAttach',image:url+'/img/attach.gif'});ed.addCommand('foswikibuttonsHide',function(){tinyMCE.execCommand("mceToggleEditor",true,ed.id);FoswikiTiny.switchToRaw(ed);});ed.addButton('hide',{title:'foswikibuttons.hide_desc',cmd:'foswikibuttonsHide',image:url+'/img/hide.gif'});ed.addCommand('foswikibuttonsFormat',function(ui,fn){var format=null;for(var i=0;i<ed.fw_formats.length;i++){if(ed.fw_formats[i].name==fn){format=ed.fw_formats[i];break;}} 4 4 if(format.el!=null){var fmt=format.el;if(fmt.length) 5 5 fmt='<'+fmt+'>';ed.execCommand('FormatBlock',false,fmt);if(format.el==''){var elm=ed.selection.getNode();ed.execCommand('removeformat',false,elm);}} -
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin_src.js
r3104 r3777 54 54 inline : true 55 55 }, { 56 plugin_url: url ,56 plugin_url: url 57 57 }); 58 58 }); … … 76 76 inline : true 77 77 }, { 78 plugin_url: url ,78 plugin_url: url 79 79 }); 80 80 }); -
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikiimage/editor_plugin.js
r3104 r3777 1 1 (function(){tinymce.PluginManager.requireLangPack('foswikiimage');tinymce.create('tinymce.plugins.FoswikiImage',{init:function(ed,url){ed.addCommand('foswikiimage',function(){ed.windowManager.open({location:false,menubar:false,toolbar:false,status:false,url:url+'/image.htm',width:480,height:385,movable:true,inline:true},{plugin_url:url,attach_url:FoswikiTiny.getFoswikiVar("PUBURL")+'/' 2 2 +FoswikiTiny.getFoswikiVar("WEB")+'/' 3 +FoswikiTiny.getFoswikiVar("TOPIC")+'/',vars:ed.getParam("foswiki_vars","")});});ed.addButton('image',{title:'foswikiimage.image_desc',cmd:'foswikiimage' ,});},getInfo:function(){return{longname:'Foswiki image',author:'Crawford Currie, from Moxiecode Systems AB original',authorurl:'http://c-dot.co.uk.com',infourl:'http://foswiki.org/Extensions/TinyMCEPlugin',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},_nodeChange:function(ed,cm,n,co){if(n==null)3 +FoswikiTiny.getFoswikiVar("TOPIC")+'/',vars:ed.getParam("foswiki_vars","")});});ed.addButton('image',{title:'foswikiimage.image_desc',cmd:'foswikiimage'});},getInfo:function(){return{longname:'Foswiki image',author:'Crawford Currie, from Moxiecode Systems AB original',authorurl:'http://c-dot.co.uk.com',infourl:'http://foswiki.org/Extensions/TinyMCEPlugin',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};},_nodeChange:function(ed,cm,n,co){if(n==null) 4 4 return;cm.setActive('foswikiimage',ed.dom.getParent(n,'img')!=null);}});tinymce.PluginManager.add('foswikiimage',tinymce.plugins.FoswikiImage);})(); -
trunk/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikiimage/editor_plugin_src.js
r3104 r3777 46 46 ed.addButton('image', { 47 47 title : 'foswikiimage.image_desc', 48 cmd : 'foswikiimage' ,48 cmd : 'foswikiimage' 49 49 }); 50 50 },
Note: See TracChangeset
for help on using the changeset viewer.
