[ Index ] |
|
Code source de PHP NUKE 7.9 |
1 function TinyMCE_default_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 /** 44 * Insert link template function. 45 */ 46 function TinyMCE_default_getInsertLinkTemplate() { 47 var template = new Array(); 48 49 template['file'] = 'link.htm'; 50 template['width'] = 320; 51 template['height'] = 200; 52 53 // Language specific width and height addons 54 template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); 55 template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0); 56 57 return template; 58 } 59 60 /** 61 * Insert image template function. 62 */ 63 function TinyMCE_default_getInsertImageTemplate() { 64 var template = new Array(); 65 66 template['file'] = 'image.htm'; 67 template['width'] = 360; 68 template['height'] = 200; 69 70 // Language specific width and height addons 71 template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); 72 template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); 73 74 return template; 75 } 76 77 function TinyMCE_default_handleNodeChange(editor_id, node) { 78 // Reset old states 79 tinyMCE.switchClassSticky(editor_id + '_left', 'mceButtonNormal'); 80 tinyMCE.switchClassSticky(editor_id + '_right', 'mceButtonNormal'); 81 tinyMCE.switchClassSticky(editor_id + '_center', 'mceButtonNormal'); 82 tinyMCE.switchClassSticky(editor_id + '_full', 'mceButtonNormal'); 83 tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal'); 84 tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal'); 85 tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal'); 86 tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal'); 87 tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal'); 88 tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal'); 89 90 // Handle align attributes 91 alignNode = node; 92 breakOut = false; 93 do { 94 if (!alignNode.getAttribute || !alignNode.getAttribute('align')) 95 continue; 96 97 switch (alignNode.getAttribute('align').toLowerCase()) { 98 case "left": 99 tinyMCE.switchClassSticky(editor_id + '_left', 'mceButtonSelected'); 100 breakOut = true; 101 break; 102 103 case "right": 104 tinyMCE.switchClassSticky(editor_id + '_right', 'mceButtonSelected'); 105 breakOut = true; 106 break; 107 108 case "middle": 109 case "center": 110 tinyMCE.switchClassSticky(editor_id + '_center', 'mceButtonSelected'); 111 breakOut = true; 112 break; 113 114 case "justify": 115 tinyMCE.switchClassSticky(editor_id + '_full', 'mceButtonSelected'); 116 breakOut = true; 117 break; 118 } 119 } while (!breakOut && (alignNode = alignNode.parentNode)); 120 121 // Handle elements 122 do { 123 switch (node.nodeName.toLowerCase()) { 124 case "b": 125 case "strong": 126 tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected'); 127 break; 128 129 case "i": 130 case "em": 131 tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected'); 132 break; 133 134 case "u": 135 tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected'); 136 break; 137 138 case "strike": 139 tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected'); 140 break; 141 142 case "ul": 143 tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected'); 144 break; 145 146 case "ol": 147 tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected'); 148 break; 149 } 150 } while ((node = node.parentNode)); 151 }
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 |