Changeset 1829

Show
Ignore:
Timestamp:
11/02/06 09:55:34 (2 years ago)
Author:
uta
Message:

#197

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • vendor/tinymce-2.0.6.1_customized/tiny_mce/plugins/bgcolor/editor_plugin.js

    r1762 r1829  
    1818        }, 
    1919        execCommand : function(editor_id, element, command, user_interface, value) { 
     20                var bgcolor_div = 'bgcolor_' + editor_id + '_div' 
    2021                switch (command) { 
    2122                        case 'mceBgcolor': 
     
    2930                                template['height']  = 190; 
    3031                                tinyMCE.openWindow(template, {editor_id:editor_id, inline:'yes', command:'bgcolor', input_color:inputColor}); 
    31                                 break
     32                                return true
    3233                        case 'bgcolor': 
    33                                 var elm = tinyMCE.selectedInstance.getDoc().getElementById('tiny_mce_bgcolor_plugin_div'); 
     34                                var elm = tinyMCE.selectedInstance.getDoc().getElementById(bgcolor_div); 
    3435                                if(elm) { 
    3536                                        elm.style.backgroundColor = value; 
    3637                                } else { 
    3738                                        tinyMCE.execCommand('selectall', false, null); 
    38                                         tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, '<div id="tiny_mce_bgcolor_plugin_div" style="background-color: ' + value + '; height: 100%;">' + tinyMCE.selectedInstance.selection.getSelectedHTML() + '</div>'); 
     39                                        tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, '<div id="' + bgcolor_div + '" style="background-color: ' + value + '; min-height: 100%;">' + tinyMCE.selectedInstance.selection.getSelectedHTML() + '</div>'); 
    3940                                        tinyMCE.triggerNodeChange(); 
    4041                                } 
  • vendor/tinymce-2.0.6.1_customized/tiny_mce/plugins/bgcolor/editor_plugin_src.js

    r1762 r1829  
    2727        }, 
    2828        execCommand : function(editor_id, element, command, user_interface, value) { 
     29                var bgcolor_div = 'bgcolor_' + editor_id + '_div' 
    2930                switch (command) { 
    3031                        case 'mceBgcolor': 
     
    3839                                template['height']  = 190; 
    3940                                tinyMCE.openWindow(template, {editor_id:editor_id, inline:'yes', command:'bgcolor', input_color:inputColor}); 
    40                                 break
     41                                return true
    4142                        case 'bgcolor': 
    42                                 var elm = tinyMCE.selectedInstance.getDoc().getElementById('tiny_mce_bgcolor_plugin_div'); 
     43                                var elm = tinyMCE.selectedInstance.getDoc().getElementById(bgcolor_div); 
    4344                                if(elm) { 
    4445                                        elm.style.backgroundColor = value; 
    4546                                } else { 
    4647                                        tinyMCE.execCommand('selectall', false, null); 
    47                                         tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, '<div id="tiny_mce_bgcolor_plugin_div" style="background-color: ' + value + '; height: 100%;">' + tinyMCE.selectedInstance.selection.getSelectedHTML() + '</div>'); 
     48                                        tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false, '<div id="' + bgcolor_div + '" style="background-color: ' + value + '; min-height: 100%;">' + tinyMCE.selectedInstance.selection.getSelectedHTML() + '</div>'); 
    4849                                        tinyMCE.triggerNodeChange(); 
    4950                                }