[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 function TinyMCE_simple_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\');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\');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\');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\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Strikethrough\')">\ 14 <img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">\ 15 <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\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Undo\')">\ 16 <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\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'Redo\')">\ 17 <img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">\ 18 <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\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceCleanup\')">\ 19 <img src="{$themeurl}/images/spacer.gif" width="1" height="15" class="mceSeparatorLine">\ 20 <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\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertUnorderedList\')">\ 21 <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\');tinyMCE.execInstanceCommand(\'{$editor_id}\',\'InsertOrderedList\')">\ 22 </td></tr>\ 23 </table>'; 24 25 template['delta_width'] = 0; 26 template['delta_height'] = -20; 27 28 return template; 29 } 30 31 function TinyMCE_simple_handleNodeChange(editor_id, node) { 32 // Reset old states 33 tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal'); 34 tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal'); 35 tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal'); 36 tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal'); 37 tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal'); 38 tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal'); 39 40 // Handle elements 41 do { 42 switch (node.nodeName.toLowerCase()) { 43 case "b": 44 case "strong": 45 tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected'); 46 break; 47 48 case "i": 49 case "em": 50 tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected'); 51 break; 52 53 case "u": 54 tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected'); 55 break; 56 57 case "strike": 58 tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected'); 59 break; 60 61 case "ul": 62 tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected'); 63 break; 64 65 case "ol": 66 tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected'); 67 break; 68 } 69 } while ((node = node.parentNode)); 70 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |