Changeset 1829
- Timestamp:
- 11/02/06 09:55:34 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/tinymce-2.0.6.1_customized/tiny_mce/plugins/bgcolor/editor_plugin.js
r1762 r1829 18 18 }, 19 19 execCommand : function(editor_id, element, command, user_interface, value) { 20 var bgcolor_div = 'bgcolor_' + editor_id + '_div' 20 21 switch (command) { 21 22 case 'mceBgcolor': … … 29 30 template['height'] = 190; 30 31 tinyMCE.openWindow(template, {editor_id:editor_id, inline:'yes', command:'bgcolor', input_color:inputColor}); 31 break;32 return true; 32 33 case 'bgcolor': 33 var elm = tinyMCE.selectedInstance.getDoc().getElementById( 'tiny_mce_bgcolor_plugin_div');34 var elm = tinyMCE.selectedInstance.getDoc().getElementById(bgcolor_div); 34 35 if(elm) { 35 36 elm.style.backgroundColor = value; 36 37 } else { 37 38 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>'); 39 40 tinyMCE.triggerNodeChange(); 40 41 } vendor/tinymce-2.0.6.1_customized/tiny_mce/plugins/bgcolor/editor_plugin_src.js
r1762 r1829 27 27 }, 28 28 execCommand : function(editor_id, element, command, user_interface, value) { 29 var bgcolor_div = 'bgcolor_' + editor_id + '_div' 29 30 switch (command) { 30 31 case 'mceBgcolor': … … 38 39 template['height'] = 190; 39 40 tinyMCE.openWindow(template, {editor_id:editor_id, inline:'yes', command:'bgcolor', input_color:inputColor}); 40 break;41 return true; 41 42 case 'bgcolor': 42 var elm = tinyMCE.selectedInstance.getDoc().getElementById( 'tiny_mce_bgcolor_plugin_div');43 var elm = tinyMCE.selectedInstance.getDoc().getElementById(bgcolor_div); 43 44 if(elm) { 44 45 elm.style.backgroundColor = value; 45 46 } else { 46 47 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>'); 48 49 tinyMCE.triggerNodeChange(); 49 50 }
