[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 function TinyMCE_basic_getEditorTemplate() { 2 var template = new Array(); 3 4 template['html'] = '\ 5 <table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}">\ 6 <tr><td align="center">\ 7 <span id="{$editor_id}">IFRAME</span>\ 8 </td></tr>\ 9 <tr><td class="mceToolbar" align="center" height="1">\ 10 <img id="{$editor_id}_bold" src="{$themeurl}/images/{$lang_bold_img}" title="{$lang_bold_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Bold\')">\ 11 <img id="{$editor_id}_italic" src="{$themeurl}/images/{$lang_italic_img}" title="{$lang_italic_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Italic\')">\ 12 <img id="{$editor_id}_underline" src="{$themeurl}/images/{$lang_underline_img}" title="{$lang_underline_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Underline\')">\ 13 <img id="{$editor_id}_strikethrough" src="{$themeurl}/images/strikethrough.gif" title="{$lang_striketrough_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Strikethrough\')">\ 14 <img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">\ 15 <img id="{$editor_id}_left" src="{$themeurl}/images/left.gif" title="{$lang_justifyleft_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyLeft\')">\ 16 <img id="{$editor_id}_center" src="{$themeurl}/images/center.gif" title="{$lang_justifycenter_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyCenter\')">\ 17 <img id="{$editor_id}_right" src="{$themeurl}/images/right.gif" title="{$lang_justifyright_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyRight\')">\ 18 <img id="{$editor_id}_full" src="{$themeurl}/images/full.gif" title="{$lang_justifyfull_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'JustifyFull\')">\ 19 <img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">\ 20 <img src="{$themeurl}/images/outdent.gif" title="{$lang_outdent_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Outdent\')">\ 21 <img src="{$themeurl}/images/indent.gif" title="{$lang_indent_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Indent\')">\ 22 <br>\ 23 <img id="{$editor_id}_bullist" src="{$themeurl}/images/bullist.gif" title="{$lang_bullist_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertUnorderedList\')">\ 24 <img id="{$editor_id}_numlist" src="{$themeurl}/images/numlist.gif" title="{$lang_numlist_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertOrderedList\')">\ 25 <img src="{$themeurl}/images/spacer.gif" width="1" height="15" width="20" height="20" class="mceSeparatorLine">\ 26 <img src="{$themeurl}/images/undo.gif" title="{$lang_undo_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\')">\ 27 <img src="{$themeurl}/images/redo.gif" title="{$lang_redo_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\')">\ 28 <img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">\ 29 <img id="{$editor_id}_link" src="{$themeurl}/images/link.gif" title="{$lang_link_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceLink\', true)">\ 30 <img src="{$themeurl}/images/unlink.gif" title="{$lang_unlink_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'unlink\')">\ 31 <img id="{$editor_id}_image" src="{$themeurl}/images/image.gif" title="{$lang_image_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceImage\', true)">\ 32 <img src="{$themeurl}/images/cleanup.gif" title="{$lang_cleanup_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceCleanup\')">\ 33 <img src="{$themeurl}/images/help.gif" title="{$lang_help_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceHelp\')">\ 34 </td></tr>\ 35 </table>'; 36 37 template['delta_width'] = 0; 38 template['delta_height'] = -40; 39 40 return template; 41 } 42 43 function TinyMCE_basic_execCommand(editor_id, element, command, user_interface, value) { 44 switch (command) { 45 case "mceCodeEditor": 46 var template = new Array(); 47 48 template['file'] = 'source_editor.htm'; 49 template['width'] = tinyMCE.getParam("theme_basic_source_editor_width", 500); 50 template['height'] = tinyMCE.getParam("theme_basic_source_editor_height", 400); 51 52 tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no"}); 53 return true; 54 } 55 56 // Default behavior 57 return false; 58 } 59 60 61 /** 62 * Insert link template function. 63 */ 64 function TinyMCE_basic_getInsertLinkTemplate() { 65 var template = new Array(); 66 67 template['file'] = 'link.htm'; 68 template['width'] = 320; 69 template['height'] = 200; 70 71 // Language specific width and height addons 72 template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); 73 template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0); 74 75 return template; 76 } 77 78 /** 79 * Insert image template function. 80 */ 81 function TinyMCE_basic_getInsertImageTemplate() { 82 var template = new Array(); 83 84 template['file'] = 'image.htm'; 85 template['width'] = 360; 86 template['height'] = 200; 87 88 // Language specific width and height addons 89 template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); 90 template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); 91 92 return template; 93 } 94 95 function TinyMCE_basic_handleNodeChange(editor_id, node) { 96 // Reset old states 97 tinyMCE.switchClassSticky(editor_id + '_left', 'mceButtonNormal'); 98 tinyMCE.switchClassSticky(editor_id + '_right', 'mceButtonNormal'); 99 tinyMCE.switchClassSticky(editor_id + '_center', 'mceButtonNormal'); 100 tinyMCE.switchClassSticky(editor_id + '_full', 'mceButtonNormal'); 101 tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal'); 102 tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal'); 103 tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal'); 104 tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal'); 105 tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal'); 106 tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal'); 107 108 // Handle align attributes 109 alignNode = node; 110 breakOut = false; 111 do { 112 if (!alignNode.getAttribute || !alignNode.getAttribute('align')) 113 continue; 114 115 switch (alignNode.getAttribute('align').toLowerCase()) { 116 case "left": 117 tinyMCE.switchClassSticky(editor_id + '_left', 'mceButtonSelected'); 118 breakOut = true; 119 break; 120 121 case "right": 122 tinyMCE.switchClassSticky(editor_id + '_right', 'mceButtonSelected'); 123 breakOut = true; 124 break; 125 126 case "middle": 127 case "center": 128 tinyMCE.switchClassSticky(editor_id + '_center', 'mceButtonSelected'); 129 breakOut = true; 130 break; 131 132 case "justify": 133 tinyMCE.switchClassSticky(editor_id + '_full', 'mceButtonSelected'); 134 breakOut = true; 135 break; 136 } 137 } while (!breakOut && (alignNode = alignNode.parentNode)); 138 139 // Handle elements 140 do { 141 switch (node.nodeName.toLowerCase()) { 142 case "b": 143 case "strong": 144 tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected'); 145 break; 146 147 case "i": 148 case "em": 149 tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected'); 150 break; 151 152 case "u": 153 tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected'); 154 break; 155 156 case "strike": 157 tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected'); 158 break; 159 160 case "ul": 161 tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected'); 162 break; 163 164 case "ol": 165 tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected'); 166 break; 167 } 168 } while ((node = node.parentNode)); 169 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |