Changeset 5872


Ignore:
Timestamp:
12/29/09 09:18:34 (2 years ago)
Author:
PaulHarvey
Message:

Item2447: Fix an annoyance where the selected format didn't always match what the cursor was in (would not go back to 'Normal'), so Eg. sometimes it would show the last format that you applied (Eg., Heading3) even though the cursor is in a blockquote, plain para, etc.

Location:
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin.js

    r5871 r5872  
    1515cm.setActive('colour',true);else 
    1616cm.setActive('colour',false);if(ed.fw_lb){var puck=-1;var nn=n.nodeName.toLowerCase();do{for(var i=0;i<ed.fw_formats.length;i++){if((!ed.fw_formats[i].el||ed.fw_formats[i].el==nn)&&(!ed.fw_formats[i].style||ed.dom.hasClass(ed.fw_formats[i].style))){puck=i;if(puck>0) 
    17 break;}}}while(puck<0&&(n=n.parentNode)!=null);if(puck>=0){ed.fw_lb.selectByIndex(puck);}} 
     17break;}}}while(puck<0&&(n=n.parentNode)!=null);if(puck>=0){ed.fw_lb.selectByIndex(puck);}else{ed.fw_lb.selectByIndex(0);}} 
    1818return true;}});tinymce.PluginManager.add('foswikibuttons',tinymce.plugins.FoswikiButtons);})(); 
  • branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/foswikibuttons/editor_plugin_src.js

    r5860 r5872  
    233233                if (puck >= 0) { 
    234234                    ed.fw_lb.selectByIndex(puck); 
     235                } else { 
     236                    // A region has been selected that doesn't match any known 
     237                    // foswiki formats, so select the first format in our list  
     238                    // ('Normal'). 
     239                    ed.fw_lb.selectByIndex(0); 
    235240                } 
    236241            } 
Note: See TracChangeset for help on using the changeset viewer.