Changeset 7

Show
Ignore:
Timestamp:
11/15/07 23:43:01 (1 year ago)
Author:
brennan
Message:

fixed up the custom editor to just show the buttons for basic editing while still providing css class selector

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Website/Controls/EditorControl.ascx.cs

    r6 r7  
    1616{ 
    1717 
     18    public event EventHandler ContentSaving; 
    1819    public event EventHandler ContentSaved; 
     20 
     21    protected virtual void OnContentSaving(EventArgs e) 
     22    { 
     23        if (ContentSaving != null) 
     24        { 
     25            ContentSaving(this, e); 
     26        } 
     27    } 
    1928 
    2029    protected virtual void OnContentSaved(EventArgs e) 
     
    4150            string script = "tinyMCE.init({" + 
    4251                "mode : 'exact', " + 
    43                 "theme : 'advanced', " + 
     52                //"theme : 'advanced', " + 
     53                "theme : 'custom', " + 
     54                //"theme : 'intermediate', " + 
    4455                "content_css: '" + Utility.GetRelativeSiteUrl("~/style.css") + "', " + 
    4556                "elements : '" + tbContent.ClientID +  
     
    5364        MarkupCleaner cleaner = new MarkupCleaner(); 
    5465        cleaner.OptionFile = Server.MapPath("~/Controls/tidy.config"); 
     66        OnContentSaving(EventArgs.Empty); 
    5567        Content = cleaner.CleanContent(Content); 
    5668        OnContentSaved(EventArgs.Empty); 
  • trunk/Website/Default.aspx

    r6 r7  
    1111        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
    1212        <div id="Main"> 
    13             <sst:Editor ID="editor1" runat="server" Content="<div class='regular'>Hello Editor!</div>"/> 
    14             <div id="SavedContent"> 
    15             <asp:PlaceHolder ID="phSavedContent" runat="server"></asp:PlaceHolder> 
    16             </div> 
     13            <sst:Editor ID="editor1" runat="server"  
     14                Content="<div class='regular'>Hello Editor!</div>" 
     15                ContentSaved="editor1_ContentSaved" 
     16                ContentSaving="editor1_ContentSaving" /> 
     17 
     18            <table border="1"> 
     19                <tr> 
     20                    <th>Unclean</th> 
     21                    <th>Clean</th> 
     22                </tr> 
     23                <tr> 
     24                    <td style="vertical-align: top;"> 
     25                        <div class="SavedContent"> 
     26                            <asp:PlaceHolder ID="phSavedContent" runat="server"></asp:PlaceHolder> 
     27                        </div> 
     28                    </td> 
     29                    <td style="vertical-align: top;"> 
     30                        <div class="SavedContent"> 
     31                            <asp:PlaceHolder ID="phSavedContent2" runat="server"></asp:PlaceHolder> 
     32                        </div> 
     33                    </td> 
     34                </tr> 
     35            </table> 
    1736        </div> 
    1837    </form> 
  • trunk/Website/Default.aspx.cs

    r6 r7  
    1414    { 
    1515        editor1.ContentSaved += new EventHandler(editor1_ContentSaved); 
     16        editor1.ContentSaving += new EventHandler(editor1_ContentSaving); 
    1617    } 
    1718 
    18     void editor1_ContentSaved(object sender, EventArgs e) 
     19    void editor1_ContentSaving(object sender, EventArgs e) 
    1920    { 
    2021        phSavedContent.Controls.Clear(); 
     
    2223    } 
    2324 
     25    void editor1_ContentSaved(object sender, EventArgs e) 
     26    { 
     27        phSavedContent2.Controls.Clear(); 
     28        phSavedContent2.Controls.Add(new LiteralControl(editor1.Content)); 
     29    } 
     30 
    2431} 
  • trunk/Website/style.css

    r5 r7  
    1 *  
     1body 
    22{ 
    33        margin: 0; 
     
    1212} 
    1313 
    14 div#SavedContent 
     14div.SavedContent 
    1515{ 
    1616        margin: 3px; 
  • trunk/Website/tiny_mce/themes/custom/css/editor_popup.css

    r5 r7  
    317317input.invalid { border: 1px solid #EE0000; } 
    318318 
    319 /* Disables the advanced tab in the table plugin. */ 
     319/* Disables the custom tab in the table plugin. */ 
    320320/* 
    321 #table #advanced_tab { 
     321#table #custom_tab { 
    322322        display: none; 
    323323} 
  • trunk/Website/tiny_mce/themes/custom/editor_template.js

    r5 r7  
    66*/ 
    77 
    8 tinyMCE.importThemeLanguagePack('custom');var TinyMCE_CustomTheme={_defColors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['underline','{$lang_underline_img}','lang_underline_desc','Underline'],['strikethrough','strikethrough.gif','lang_striketrough_desc','Strikethrough'],['justifyleft','justifyleft.gif','lang_justifyleft_desc','JustifyLeft'],['justifycenter','justifycenter.gif','lang_justifycenter_desc','JustifyCenter'],['justifyright','justifyright.gif','lang_justifyright_desc','JustifyRight'],['justifyfull','justifyfull.gif','lang_justifyfull_desc','JustifyFull'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['image','image.gif','lang_image_desc','mceImage',true],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['sub','sub.gif','lang_theme_sub_desc','subscript'],['sup','sup.gif','lang_theme_sup_desc','superscript'],['forecolor','forecolor.gif','lang_theme_forecolor_desc','forecolor',true],['forecolorpicker','forecolor.gif','lang_theme_forecolor_desc','forecolorpicker',true],['backcolor','backcolor.gif','lang_theme_backcolor_desc','HiliteColor',true],['backcolorpicker','backcolor.gif','lang_theme_backcolor_desc','backcolorpicker',true],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['visualaid','visualaid.gif','lang_theme_visualaid_desc','mceToggleVisualAid'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor'],['newdocument','newdocument.gif','lang_newdocument_desc','mceNewDocument']],_buttonMap:'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',getControlHTML:function(button_name){var i,x,but;for(i=0;i<TinyMCE_CustomTheme._buttons.length;i++){but=TinyMCE_CustomTheme._buttons[i];if(but[0]==button_name&&(button_name=="forecolor"||button_name=="backcolor")) 
     8tinyMCE.importThemeLanguagePack('custom');var TinyMCE_CustomTheme={_defColors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor']],_buttonMap:'anchor,bold,bullist,charmap,cleanup,code,copy,cut,help,indent,italic,hr,link,numlist,outdent,paste,redo,removeformat,undo,unlink,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search',getControlHTML:function(button_name){var i,x,but;for(i=0;i<TinyMCE_CustomTheme._buttons.length;i++){but=TinyMCE_CustomTheme._buttons[i];if(but[0]==button_name&&(button_name=="forecolor"||button_name=="backcolor")) 
    99return tinyMCE.getMenuButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3]+"Menu",but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null));if(but[0]==button_name) 
    1010return tinyMCE.getButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null));} 
     
    5656var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_custom_resizing",false);var path=tinyMCE.getParam("theme_custom_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="tinyMCE.themes.custom._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_custom_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_custom_styles']){var stylesAr=settings['theme_custom_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>';} 
    5757TinyMCE_CustomTheme._autoImportCSSClasses=false;} 
    58 switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_custom_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_custom_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_custom_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_custom_statusbar_location",pathLocation);var defVals={theme_custom_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_custom_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_custom_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='<a href="#" accesskey="q" title="'+tinyMCE.getLang("lang_toolbar_focus")+'"';if(!tinyMCE.getParam("accessibility_focus")) 
     58switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_custom_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_custom_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_custom_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_custom_statusbar_location",pathLocation);var defVals={theme_custom_buttons1:"bold,italic,bullist,numlist,outdent,indent,separator,styleselect,formatselect",theme_custom_buttons2:"link,unlink,anchor,hr,removeformat,separator,charmap,undo,redo,cleanup,code,help",theme_custom_buttons3:""};toolbarHTML+='<a href="#" accesskey="q" title="'+tinyMCE.getLang("lang_toolbar_focus")+'"';if(!tinyMCE.getParam("accessibility_focus")) 
    5959toolbarHTML+=' onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"';toolbarHTML+='></a>';for(var i=1;i<100;i++){var def=defVals["theme_custom_buttons"+i];var buttons=tinyMCE.getParam("theme_custom_buttons"+i,def==null?'':def,true,',');if(buttons.length==0) 
    6060break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_custom_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_custom_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_custom_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++) 
  • trunk/Website/tiny_mce/themes/custom/editor_template_src.js

    r5 r7  
    1111                ['bold', '{$lang_bold_img}', 'lang_bold_desc', 'Bold'], 
    1212                ['italic', '{$lang_italic_img}', 'lang_italic_desc', 'Italic'], 
    13                 ['underline', '{$lang_underline_img}', 'lang_underline_desc', 'Underline'], 
    14                 ['strikethrough', 'strikethrough.gif', 'lang_striketrough_desc', 'Strikethrough'], 
    15                 ['justifyleft', 'justifyleft.gif', 'lang_justifyleft_desc', 'JustifyLeft'], 
    16                 ['justifycenter', 'justifycenter.gif', 'lang_justifycenter_desc', 'JustifyCenter'], 
    17                 ['justifyright', 'justifyright.gif', 'lang_justifyright_desc', 'JustifyRight'], 
    18                 ['justifyfull', 'justifyfull.gif', 'lang_justifyfull_desc', 'JustifyFull'], 
     13                //['underline', '{$lang_underline_img}', 'lang_underline_desc', 'Underline'], 
     14                //['strikethrough', 'strikethrough.gif', 'lang_striketrough_desc', 'Strikethrough'], 
     15                //['justifyleft', 'justifyleft.gif', 'lang_justifyleft_desc', 'JustifyLeft'], 
     16                //['justifycenter', 'justifycenter.gif', 'lang_justifycenter_desc', 'JustifyCenter'], 
     17                //['justifyright', 'justifyright.gif', 'lang_justifyright_desc', 'JustifyRight'], 
     18                //['justifyfull', 'justifyfull.gif', 'lang_justifyfull_desc', 'JustifyFull'], 
    1919                ['bullist', 'bullist.gif', 'lang_bullist_desc', 'InsertUnorderedList'], 
    2020                ['numlist', 'numlist.gif', 'lang_numlist_desc', 'InsertOrderedList'], 
     
    2828                ['link', 'link.gif', 'lang_link_desc', 'mceLink', true], 
    2929                ['unlink', 'unlink.gif', 'lang_unlink_desc', 'unlink'], 
    30                 ['image', 'image.gif', 'lang_image_desc', 'mceImage', true], 
     30                //['image', 'image.gif', 'lang_image_desc', 'mceImage', true], 
    3131                ['cleanup', 'cleanup.gif', 'lang_cleanup_desc', 'mceCleanup'], 
    3232                ['help', 'help.gif', 'lang_help_desc', 'mceHelp'], 
     
    3434                ['hr', 'hr.gif', 'lang_theme_hr_desc', 'inserthorizontalrule'], 
    3535                ['removeformat', 'removeformat.gif', 'lang_theme_removeformat_desc', 'removeformat'], 
    36                 ['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'], 
    37                 ['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'], 
    38                 ['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolor', true], 
    39                 ['forecolorpicker', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolorpicker', true], 
    40                 ['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'HiliteColor', true], 
    41                 ['backcolorpicker', 'backcolor.gif', 'lang_theme_backcolor_desc', 'backcolorpicker', true], 
     36                //['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'], 
     37                //['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'], 
     38                //['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolor', true], 
     39                //['forecolorpicker', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolorpicker', true], 
     40                //['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'HiliteColor', true], 
     41                //['backcolorpicker', 'backcolor.gif', 'lang_theme_backcolor_desc', 'backcolorpicker', true], 
    4242                ['charmap', 'charmap.gif', 'lang_theme_charmap_desc', 'mceCharMap'], 
    43                 ['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'], 
    44                 ['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor']
    45                 ['newdocument', 'newdocument.gif', 'lang_newdocument_desc', 'mceNewDocument'] 
     43                //['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'], 
     44                ['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor']//
     45                //['newdocument', 'newdocument.gif', 'lang_newdocument_desc', 'mceNewDocument'] 
    4646        ], 
    4747 
    48         _buttonMap : 'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table', 
     48        _buttonMap : 'anchor,bold,bullist,charmap,cleanup,code,copy,cut,help,indent,italic,hr,link,numlist,outdent,paste,redo,removeformat,undo,unlink,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search', 
    4949 
    5050        /** 
     
    571571                                var statusbarLocation = tinyMCE.getParam("theme_custom_statusbar_location", pathLocation); 
    572572                                var defVals = { 
    573                                         theme_custom_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect", 
    574                                         theme_custom_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code", 
    575                                         theme_custom_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap
     573                                        theme_custom_buttons1 : "bold,italic,bullist,numlist,outdent,indent,separator,styleselect,formatselect", 
     574                                        theme_custom_buttons2 : "link,unlink,anchor,hr,removeformat,separator,charmap,undo,redo,cleanup,code,help", 
     575                                        theme_custom_buttons3 : "
    576576                                }; 
    577577 
  • trunk/Website/tiny_mce/themes/custom/jscripts/image.js

    r5 r7  
    1919 
    2020        tinyMCEPopup.restoreSelection(); 
    21         tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align); 
     21        tinyMCE.themes['custom']._insertImage(src, alt, border, hspace, vspace, width, height, align); 
    2222        tinyMCEPopup.close(); 
    2323} 
     
    2626        tinyMCEPopup.resizeToInnerSize(); 
    2727 
    28         document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); 
     28        document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_custom_image'); 
    2929 
    3030        var formObj = document.forms[0]; 
  • trunk/Website/tiny_mce/themes/custom/jscripts/link.js

    r5 r7  
    1111        tinyMCEPopup.resizeToInnerSize(); 
    1212 
    13         document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link'); 
     13        document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_custom_link'); 
    1414 
    1515        // Handle file browser 
     
    3030        document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);  
    3131 
    32         addClassesToList('styleSelect', 'theme_advanced_link_styles'); 
     32        addClassesToList('styleSelect', 'theme_custom_link_styles'); 
    3333        selectByValue(formObj, 'styleSelect', tinyMCE.getWindowArg('className'), true); 
    3434 
     
    7070 
    7171        tinyMCEPopup.restoreSelection(); 
    72         tinyMCE.themes['advanced']._insertLink(href, target, title, dummy, style_class); 
     72        tinyMCE.themes['custom']._insertLink(href, target, title, dummy, style_class); 
    7373        tinyMCEPopup.close(); 
    7474} 
  • trunk/Website/tiny_mce/themes/custom/jscripts/source_editor.js

    r5 r7  
    1515        resizeInputs(); 
    1616 
    17         if (tinyMCE.getParam("theme_advanced_source_editor_wrap", true)) { 
     17        if (tinyMCE.getParam("theme_custom_source_editor_wrap", true)) { 
    1818                setWrap('soft'); 
    1919                document.getElementById('wraped').checked = true; 
  • trunk/Website/tiny_mce/themes/custom/link.htm

    r5 r7  
    5555                                <script language="javascript"> 
    5656                                        var html = ""; 
    57                                         var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';'); 
     57                                        var targets = tinyMCE.getParam('theme_custom_link_targets', '').split(';'); 
    5858 
    5959                                        for (var i=0; i<targets.length; i++) { 
  • trunk/Website/tiny_mce/themes/intermediate/editor_template.js

    r5 r7  
    1 var TinyMCE_SimpleTheme={_buttonMap:'bold,bullist,cleanup,italic,numlist,redo,strikethrough,underline,undo',getEditorTemplate:function(){var html='';html+='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}">';html+='<tr><td align="center">';html+='<span id="{$editor_id}">IFRAME</span>';html+='</td></tr>';html+='<tr><td class="mceToolbar" align="center" height="1">';html+=tinyMCE.getButtonHTML('bold','lang_bold_desc','{$themeurl}/images/{$lang_bold_img}','Bold');html+=tinyMCE.getButtonHTML('italic','lang_italic_desc','{$themeurl}/images/{$lang_italic_img}','Italic');html+=tinyMCE.getButtonHTML('underline','lang_underline_desc','{$themeurl}/images/{$lang_underline_img}','Underline');html+=tinyMCE.getButtonHTML('strikethrough','lang_striketrough_desc','{$themeurl}/images/strikethrough.gif','Strikethrough');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('undo','lang_undo_desc','{$themeurl}/images/undo.gif','Undo');html+=tinyMCE.getButtonHTML('redo','lang_redo_desc','{$themeurl}/images/redo.gif','Redo');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('cleanup','lang_cleanup_desc','{$themeurl}/images/cleanup.gif','mceCleanup');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('bullist','lang_bullist_desc','{$themeurl}/images/bullist.gif','InsertUnorderedList');html+=tinyMCE.getButtonHTML('numlist','lang_numlist_desc','{$themeurl}/images/numlist.gif','InsertOrderedList');html+='</td></tr></table>';return{delta_width:0,delta_height:20,html:html}},handleNodeChange:function(editor_id,node){tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');do{switch(node.nodeName.toLowerCase()){case"b":case"strong":tinyMCE.switchClass(editor_id+'_bold','mceButtonSelected');break;case"i":case"em":tinyMCE.switchClass(editor_id+'_italic','mceButtonSelected');break;case"u":tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected');break;case"strike":tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonSelected');break;case"ul":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"ol":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break}}while((node=node.parentNode)!=null)}};tinyMCE.addTheme("simple",TinyMCE_SimpleTheme);tinyMCE.addButtonMap(TinyMCE_SimpleTheme._buttonMap); 
     1/* 
     2 * JSMin 
     3 * Javascript Compressor 
     4 * http://www.crockford.com/ 
     5 * http://www.smallsharptools.com/ 
     6*/ 
     7 
     8tinyMCE.importThemeLanguagePack('intermediate');var TinyMCE_IntermediateTheme={_buttonMap:'bold,bullist,cleanup,italic,numlist,redo,strikethrough,underline,undo',getEditorTemplate:function(){var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_intermediate_styles']){var stylesAr=settings['theme_intermediate_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>';} 
     9TinyMCE_IntermediateTheme._autoImportCSSClasses=false;} 
     10var html='';html+='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}">';html+='<tr><td align="center">';html+='<span id="{$editor_id}">IFRAME</span>';html+='</td></tr>';html+='<tr><td class="mceToolbar" align="center" height="1">';html+=tinyMCE.getButtonHTML('bold','lang_bold_desc','{$themeurl}/images/{$lang_bold_img}','Bold');html+=tinyMCE.getButtonHTML('italic','lang_italic_desc','{$themeurl}/images/{$lang_italic_img}','Italic');html+=tinyMCE.getButtonHTML('underline','lang_underline_desc','{$themeurl}/images/{$lang_underline_img}','Underline');html+=tinyMCE.getButtonHTML('strikethrough','lang_striketrough_desc','{$themeurl}/images/strikethrough.gif','Strikethrough');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('undo','lang_undo_desc','{$themeurl}/images/undo.gif','Undo');html+=tinyMCE.getButtonHTML('redo','lang_redo_desc','{$themeurl}/images/redo.gif','Redo');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('cleanup','lang_cleanup_desc','{$themeurl}/images/cleanup.gif','mceCleanup');html+='<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" />';html+=tinyMCE.getButtonHTML('bullist','lang_bullist_desc','{$themeurl}/images/bullist.gif','InsertUnorderedList');html+=tinyMCE.getButtonHTML('numlist','lang_numlist_desc','{$themeurl}/images/numlist.gif','InsertOrderedList');html+=tinyMCE.getButtonHTML('cleanup','lang_cleanup_desc','{$themeurl}/images/cleanup.gif','mceCleanup');html+=tinyMCE.getButtonHTML('help','lang_help_desc','{$themeurl}/images/help.gif','mceHelp');html+=tinyMCE.getButtonHTML('code','lang_theme_code_desc','{$themeurl}/images/code.gif','mceCodeEditor');html+="<b>HERE</b>";html+='</td></tr></table>';return{delta_width:0,delta_height:20,html:html};},handleNodeChange:function(editor_id,node){tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');do{switch(node.nodeName.toLowerCase()){case"b":case"strong":tinyMCE.switchClass(editor_id+'_bold','mceButtonSelected');break;case"i":case"em":tinyMCE.switchClass(editor_id+'_italic','mceButtonSelected');break;case"u":tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected');break;case"strike":tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonSelected');break;case"ul":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"ol":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break;case"mceHelp":alert("mceHelp");return true;case"mceCodeEditor":alert("mceCodeEditor");return true;}}while((node=node.parentNode)!=null);},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case"mceHelp":tinyMCE.openWindow({file:'about.htm',width:480,height:380},{tinymce_version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion,tinymce_releasedate:tinyMCE.releaseDate,inline:"yes"});return true;case"mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_intermediate_source_editor_width",720));template['height']=parseInt(tinyMCE.getParam("theme_intermediate_source_editor_height",580));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;}}};tinyMCE.addTheme("intermediate",TinyMCE_IntermediateTheme);tinyMCE.addButtonMap(TinyMCE_IntermediateTheme._buttonMap); 
  • trunk/Website/tiny_mce/themes/intermediate/editor_template_src.js

    r5 r7  
    1 /** 
    2  * $Id: editor_template_src.js 162 2007-01-03 16:16:52Z spocke $ 
    3  * 
    4  * @author Moxiecode 
    5  * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. 
    6  */ 
    71 
    8 var TinyMCE_SimpleTheme = { 
     2/* Import theme specific language pack */ 
     3tinyMCE.importThemeLanguagePack('intermediate'); 
     4 
     5var TinyMCE_IntermediateTheme = { 
    96        // List of button ids in tile map 
    107        _buttonMap : 'bold,bullist,cleanup,italic,numlist,redo,strikethrough,underline,undo', 
    118 
    129        getEditorTemplate : function() { 
     10 
     11                // Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY! 
     12                var styleSelectHTML = '<option value="">{$lang_theme_style_select}</option>'; 
     13                if (settings['theme_intermediate_styles']) { 
     14                        var stylesAr = settings['theme_intermediate_styles'].split(';'); 
     15                         
     16                        for (var i=0; i<stylesAr.length; i++) { 
     17                                var key, value; 
     18 
     19                                key = stylesAr[i].split('=')[0]; 
     20                                value = stylesAr[i].split('=')[1]; 
     21 
     22                                styleSelectHTML += '<option value="' + value + '">' + key + '</option>'; 
     23                        } 
     24 
     25                        TinyMCE_IntermediateTheme._autoImportCSSClasses = false; 
     26                } 
     27         
    1328                var html = ''; 
    1429 
     
    3045                html += tinyMCE.getButtonHTML('bullist', 'lang_bullist_desc', '{$themeurl}/images/bullist.gif', 'InsertUnorderedList'); 
    3146                html += tinyMCE.getButtonHTML('numlist', 'lang_numlist_desc', '{$themeurl}/images/numlist.gif', 'InsertOrderedList'); 
     47                 
     48                html += tinyMCE.getButtonHTML('cleanup', 'lang_cleanup_desc', '{$themeurl}/images/cleanup.gif', 'mceCleanup'); 
     49                html += tinyMCE.getButtonHTML('help', 'lang_help_desc', '{$themeurl}/images/help.gif', 'mceHelp'); 
     50                html += tinyMCE.getButtonHTML('code', 'lang_theme_code_desc', '{$themeurl}/images/code.gif', 'mceCodeEditor'); 
     51         
     52            html += "<b>HERE</b>";       
     53                 
    3254                html += '</td></tr></table>'; 
    3355 
     
    7698                                        tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonSelected'); 
    7799                                break; 
     100                                         
     101                                case "mceHelp": 
     102                                    alert("mceHelp"); 
     103                            return true; 
     104                                         
     105                                case "mceCodeEditor": 
     106                                    alert("mceCodeEditor"); 
     107                                return true; 
     108                                         
    78109                        } 
    79110                } while ((node = node.parentNode) != null); 
     111        }, 
     112 
     113        execCommand : function(editor_id, element, command, user_interface, value) { 
     114                switch (command) { 
     115                                         
     116                                case "mceHelp": 
     117                                    tinyMCE.openWindow({ 
     118                                            file : 'about.htm', 
     119                                            width : 480, 
     120                                            height : 380 
     121                                    }, { 
     122                                            tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion, 
     123                                            tinymce_releasedate : tinyMCE.releaseDate, 
     124                                            inline : "yes" 
     125                                    }); 
     126                            return true; 
     127                                         
     128                                case "mceCodeEditor": 
     129                                    var template = new Array(); 
     130 
     131                                    template['file'] = 'source_editor.htm'; 
     132                                    template['width'] = parseInt(tinyMCE.getParam("theme_intermediate_source_editor_width", 720)); 
     133                                    template['height'] = parseInt(tinyMCE.getParam("theme_intermediate_source_editor_height", 580)); 
     134 
     135                                    tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"}); 
     136                                return true; 
     137                } 
    80138        } 
     139         
     140         
    81141}; 
    82142 
    83 tinyMCE.addTheme("simple", TinyMCE_SimpleTheme); 
    84 tinyMCE.addButtonMap(TinyMCE_SimpleTheme._buttonMap); 
     143tinyMCE.addTheme("intermediate", TinyMCE_IntermediateTheme); 
     144tinyMCE.addButtonMap(TinyMCE_IntermediateTheme._buttonMap); 
  • trunk/Website/tiny_mce/themes/intermediate/langs/en.js

    r5 r7  
    1 // UK lang variables 
     1// en lang variables 
    22 
    33tinyMCE.addToLang('',{ 
  • trunk/Website/tiny_mce/tiny_mce.js

    r5 r7  
    1 function TinyMCE_Engine(){var ua;this.majorVersion="2";this.minorVersion="1.2";this.releaseDate="2007-08-21";this.instances=[];this.switchClassCache=[];this.windowArgs=[];this.loadedFiles=[];this.pendingFiles=[];this.loadingIndex=0;this.configs=[];this.currentConfig=0;this.eventHandlers=[];this.log=[];this.undoLevels=[];this.undoIndex=0;this.typingUndoIndex=-1;this.settings=[];ua=navigator.userAgent;this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(ua.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(ua.indexOf('MSIE 5.0')!=-1);this.isMSIE7=this.isMSIE&&(ua.indexOf('MSIE 7')!=-1);this.isGecko=ua.indexOf('Gecko')!=-1;this.isSafari=ua.indexOf('Safari')!=-1;this.isOpera=window['opera']&&opera.buildNumber?true:false;this.isMac=ua.indexOf('Mac')!=-1;this.isNS7=ua.indexOf('Netscape/7')!=-1;this.isNS71=ua.indexOf('Netscape/7.1')!=-1;this.dialogCounter=0;this.plugins=[];this.themes=[];this.menus=[];this.loadedPlugins=[];this.buttonMap=[];this.isLoaded=false;if(this.isOpera){this.isMSIE=true;this.isGecko=false;this.isSafari=false}this.isIE=this.isMSIE;this.isRealIE=this.isMSIE&&!this.isOpera;this.idCounter=0};TinyMCE_Engine.prototype={init:function(settings){var theme,nl,baseHREF="",i,cssPath,entities,h,p,src,elements=[],head;if(this.isMSIE5_0)return;this.settings=settings;if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){head=document.getElementsByTagName('head')[0];if(head){for(i=0,nl=head.getElementsByTagName('script');i<nl.length;i++)elements.push(nl[i])}for(i=0,nl=document.getElementsByTagName('script');i<nl.length;i++)elements.push(nl[i]);nl=document.getElementsByTagName('base');for(i=0;i<nl.length;i++){if(nl[i].href)baseHREF=nl[i].href}for(i=0;i<elements.length;i++){if(elements[i].src&&(elements[i].src.indexOf("tiny_mce.js")!=-1||elements[i].src.indexOf("tiny_mce_dev.js")!=-1||elements[i].src.indexOf("tiny_mce_src.js")!=-1||elements[i].src.indexOf("tiny_mce_gzip")!=-1)){src=elements[i].src;tinyMCE.srcMode=(src.indexOf('_src')!=-1||src.indexOf('_dev')!=-1)?'_src':'';tinyMCE.gzipMode=src.indexOf('_gzip')!=-1;src=src.substring(0,src.lastIndexOf('/'));if(settings.exec_mode=="src"||settings.exec_mode=="normal")tinyMCE.srcMode=settings.exec_mode=="src"?'_src':'';if(baseHREF!==''&&src.indexOf('://')==-1)tinyMCE.baseURL=baseHREF+src;else tinyMCE.baseURL=src;break}}}this.documentBasePath=document.location.href;if(this.documentBasePath.indexOf('?')!=-1)this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.indexOf('?'));this.documentURL=this.documentBasePath;this.documentBasePath=this.documentBasePath.substring(0,this.documentBasePath.lastIndexOf('/'));if(tinyMCE.baseURL.indexOf('://')==-1&&tinyMCE.baseURL.charAt(0)!='/'){tinyMCE.baseURL=this.documentBasePath+"/"+tinyMCE.baseURL}this._def("mode","none");this._def("theme","advanced");this._def("plugins","",true);this._def("language","en");this._def("docs_language",this.settings.language);this._def("elements","");this._def("textarea_trigger","mce_editable");this._def("editor_selector","");this._def("editor_deselector","mceNoEditor");this._def("valid_elements","+a[id|style|rel|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|style],-ul[class|style],-li[class|style],br,img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align],-sub[style|class],-sup[style|class],-blockquote[dir|style],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[style|class|align],-pre[class|align|style],address[class|align|style],-h1[id|style|dir|class|align],-h2[id|style|dir|class|align],-h3[id|style|dir|class|align],-h4[id|style|dir|class|align],-h5[id|style|dir|class|align],-h6[id|style|dir|class|align],hr[class|style],-font[face|size|style|id|class|dir|color],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],cite[title|id|class|style|dir|lang],abbr[title|id|class|style|dir|lang],acronym[title|id|class|style|dir|lang],del[title|id|class|style|dir|lang|datetime|cite],ins[title|id|class|style|dir|lang|datetime|cite]");this._def("extended_valid_elements","");this._def("invalid_elements","");this._def("encoding","");this._def("urlconverter_callback",tinyMCE.getParam("urlconvertor_callback","TinyMCE_Engine.prototype.convertURL"));this._def("save_callback","");this._def("force_br_newlines",false);this._def("force_p_newlines",true);this._def("add_form_submit_trigger",true);this._def("relative_urls",true);this._def("remove_script_host",true);this._def("focus_alert",true);this._def("document_base_url",this.documentURL);this._def("visual",true);this._def("visual_table_class","mceVisualAid");this._def("setupcontent_callback","");this._def("fix_content_duplication",true);this._def("custom_undo_redo",true);this._def("custom_undo_redo_levels",-1);this._def("custom_undo_redo_keyboard_shortcuts",true);this._def("custom_undo_redo_restore_selection",true);this._def("custom_undo_redo_global",false);this._def("verify_html",true);this._def("apply_source_formatting",false);this._def("directionality","ltr");this._def("cleanup_on_startup",false);this._def("inline_styles",false);this._def("convert_newlines_to_brs",false);this._def("auto_reset_designmode",true);this._def("entities","39,#39,160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,34,quot,38,amp,60,lt,62,gt,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",true);this._def("entity_encoding","named");this._def("cleanup_callback","");this._def("add_unload_trigger",true);this._def("ask",false);this._def("nowrap",false);this._def("auto_resize",false);this._def("auto_focus",false);this._def("cleanup",true);this._def("remove_linebreaks",true);this._def("button_tile_map",false);this._def("submit_patch",true);this._def("browsers","msie,safari,gecko,opera",true);this._def("dialog_type","window");this._def("accessibility_warnings",true);this._def("accessibility_focus",true);this._def("merge_styles_invalid_parents","");this._def("force_hex_style_colors",true);this._def("trim_span_elements",true);this._def("convert_fonts_to_spans",false);this._def("doctype",'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">');this._def("font_size_classes",'');this._def("font_size_style_values",'xx-small,x-small,small,medium,large,x-large,xx-large',true);this._def("event_elements",'a,img',true);this._def("convert_urls",true);this._def("table_inline_editing",false);this._def("object_resizing",true);this._def("custom_shortcuts",true);this._def("convert_on_click",false);this._def("content_css",'');this._def("fix_list_elements",true);this._def("fix_table_elements",false);this._def("strict_loading_mode",document.contentType=='application/xhtml+xml');this._def("hidden_tab_class",'');this._def("display_tab_class",'');this._def("gecko_spellcheck",false);this._def("hide_selects_on_submit",true);this._def("forced_root_block",false);this._def("remove_trailing_nbsp",false);this._def("save_on_tinymce_forms",false);if(this.isMSIE&&!this.isOpera)this.settings.strict_loading_mode=false;if(this.isMSIE&&this.settings.browsers.indexOf('msie')==-1)return;if(this.isGecko&&this.settings.browsers.indexOf('gecko')==-1)return;if(this.isSafari&&this.settings.browsers.indexOf('safari')==-1)return;if(this.isOpera&&this.settings.browsers.indexOf('opera')==-1)return;baseHREF=tinyMCE.settings.document_base_url;h=document.location.href;p=h.indexOf('://');if(p>0&&document.location.protocol!="file:"){p=h.indexOf('/',p+3);h=h.substring(0,p);if(baseHREF.indexOf('://')==-1)baseHREF=h+baseHREF;tinyMCE.settings.document_base_url=baseHREF;tinyMCE.settings.document_base_prefix=h}if(baseHREF.indexOf('?')!=-1)baseHREF=baseHREF.substring(0,baseHREF.indexOf('?'));this.settings.base_href=baseHREF.substring(0,baseHREF.lastIndexOf('/'))+"/";theme=this.settings.theme;this.inlineStrict='A|BR|SPAN|BDO|MAP|OBJECT|IMG|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|#text|#comment';this.inlineTransitional='A|BR|SPAN|BDO|OBJECT|APPLET|IMG|MAP|IFRAME|TT|I|B|U|S|STRIKE|BIG|SMALL|FONT|BASEFONT|EM|STRONG|DFN|CODE|Q|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|SUB|SUP|INPUT|SELECT|TEXTAREA|LABEL|BUTTON|#text|#comment';this.blockElms='H[1-6]|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|FORM|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP';this.blockRegExp=new RegExp("^("+this.blockElms+")$","i");this.posKeyCodes=[13,45,36,35,33,34,37,38,39,40];this.uniqueURL='javascript:void(091039730);';this.uniqueTag='<div id="mceTMPElement" style="display: none">TMP</div>';this.callbacks=['onInit','getInfo','getEditorTemplate','setupContent','onChange','onPageLoad','handleNodeChange','initInstance','execCommand','getControlHTML','handleEvent','cleanup','removeInstance'];this.settings.theme_href=tinyMCE.baseURL+"/themes/"+theme;if(!tinyMCE.isIE||tinyMCE.isOpera)this.settings.force_br_newlines=false;if(tinyMCE.getParam("popups_css",false)){cssPath=tinyMCE.getParam("popups_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings.popups_css=this.documentBasePath+"/"+cssPath;else this.settings.popups_css=cssPath}else this.settings.popups_css=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_popup.css";if(tinyMCE.getParam("editor_css",false)){cssPath=tinyMCE.getParam("editor_css","");if(cssPath.indexOf('://')==-1&&cssPath.charAt(0)!='/')this.settings.editor_css=this.documentBasePath+"/"+cssPath;else this.settings.editor_css=cssPath}else{if(this.settings.editor_css!=='')this.settings.editor_css=tinyMCE.baseURL+"/themes/"+theme+"/css/editor_ui.css"}if(this.configs.length==0){if(typeof(TinyMCECompressed)=="undefined"){tinyMCE.addEvent(window,"DOMContentLoaded",TinyMCE_Engine.prototype.onLoad);if(tinyMCE.isRealIE){if(document.body)tinyMCE.addEvent(document.body,"readystatechange",TinyMCE_Engine.prototype.onLoad);else tinyMCE.addEvent(document,"readystatechange",TinyMCE_Engine.prototype.onLoad)}tinyMCE.addEvent(window,"load",TinyMCE_Engine.prototype.onLoad);tinyMCE._addUnloadEvents()}}this.loadScript(tinyMCE.baseURL+'/themes/'+this.settings.theme+'/editor_template'+tinyMCE.srcMode+'.js');this.loadScript(tinyMCE.baseURL+'/langs/'+this.settings.language+'.js');this.loadCSS(this.settings.editor_css);p=tinyMCE.getParam('plugins','',true,',');if(p.length>0){for(i=0;i<p.length;i++){if(p[i].charAt(0)!='-')this.loadScript(tinyMCE.baseURL+'/plugins/'+p[i]+'/editor_plugin'+tinyMCE.srcMode+'.js')}}if(tinyMCE.getParam('entity_encoding')=='named'){settings.cleanup_entities=[];entities=tinyMCE.getParam('entities','',true,',');for(i=0;i<entities.length;i+=2)settings.cleanup_entities['c'+entities[i]]=entities[i+1]}settings.index=this.configs.length;this.configs[this.configs.length]=settings;this.loadNextScript();if(this.isIE&&!this.isOpera){try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}}this.xmlEncodeRe=new RegExp('[<>&"]','g')},_addUnloadEvents:function(){var st=tinyMCE.settings.add_unload_trigger;if(tinyMCE.isIE){if(st){tinyMCE.addEvent(window,"unload",TinyMCE_Engine.prototype.unloadHandler);tinyMCE.addEvent(window.document,"beforeunload",TinyMCE_Engine.prototype.unloadHandler)}}else{if(st)tinyMCE.addEvent(window,"unload",function(){tinyMCE.triggerSave(true,true)})}},_def:function(key,def_val,t){var v=tinyMCE.getParam(key,def_val);v=t?v.replace(/\s+/g,""):v;this.settings[key]=v},hasPlugin:function(n){return typeof(this.plugins[n])!="undefined"&&this.plugins[n]!=null},addPlugin:function(n,p){var op=this.plugins[n];p.baseURL=op?op.baseURL:tinyMCE.baseURL+"/plugins/"+n;this.plugins[n]=p;this.loadNextScript()},setPluginBaseURL:function(n,u){var op=this.plugins[n];if(op)op.baseURL=u;else this.plugins[n]={baseURL:u}},loadPlugin:function(n,u){u=u.indexOf('.js')!=-1?u.substring(0,u.lastIndexOf('/')):u;u=u.charAt(u.length-1)=='/'?u.substring(0,u.length-1):u;this.plugins[n]={baseURL:u};this.loadScript(u+"/editor_plugin"+(tinyMCE.srcMode?'_src':'')+".js")},hasTheme:function(n){return typeof(this.themes[n])!="undefined"&&this.themes[n]!=null},addTheme:function(n,t){this.themes[n]=t;this.loadNextScript()},addMenu:function(n,m){this.menus[n]=m},hasMenu:function(n){return typeof(this.plugins[n])!="undefined"&&this.plugins[n]!=null},loadScript:function(url){var i;for(i=0;i<this.loadedFiles.length;i++){if(this.loadedFiles[i]==url)return}if(tinyMCE.settings.strict_loading_mode)this.pendingFiles[this.pendingFiles.length]=url;else document.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'"></script>');this.loadedFiles[this.loadedFiles.length]=url},loadNextScript:function(){var d=document,se;if(!tinyMCE.settings.strict_loading_mode)return;if(this.loadingIndex<this.pendingFiles.length){se=d.createElementNS('http://www.w3.org/1999/xhtml','script');se.setAttribute('language','javascript');se.setAttribute('type','text/javascript');se.setAttribute('src',this.pendingFiles[this.loadingIndex++]);d.getElementsByTagName("head")[0].appendChild(se)}else this.loadingIndex=-1;},loadCSS:function(url){var ar=url.replace(/\s+/,'').split(',');var lflen=0,csslen=0,skip=false;var x=0,i=0,nl,le;for(x=0,csslen=ar.length;x<csslen;x++){if(ar[x]!=null&&ar[x]!='null'&&ar[x].length>0){for(i=0,lflen=this.loadedFiles.length;i<lflen;i++){if(this.loadedFiles[i]==ar[x]){skip=true;break}}if(!skip){if(tinyMCE.settings.strict_loading_mode){nl=document.getElementsByTagName("head");le=document.createElement('link');le.setAttribute('href',ar[x]);le.setAttribute('rel','stylesheet');le.setAttribute('type','text/css');nl[0].appendChild(le)}else document.write('<link href="'+ar[x]+'" rel="stylesheet" type="text/css" />');this.loadedFiles[this.loadedFiles.length]=ar[x]}}}},importCSS:function(doc,css){var css_ary=css.replace(/\s+/,'').split(',');var csslen,elm,headArr,x,css_file;for(x=0,csslen=css_ary.length;x<csslen;x++){css_file=css_ary[x];if(css_file!=null&&css_file!='null'&&css_file.length>0){if(css_file.indexOf('://')==-1&&css_file.charAt(0)!='/')css_file=this.documentBasePath+"/"+css_file;if(typeof(doc.createStyleSheet)=="undefined"){elm=doc.createElement("link");elm.rel="stylesheet";elm.href=css_file;if((headArr=doc.getElementsByTagName("head"))!=null&&headArr.length>0)headArr[0].appendChild(elm)}else doc.createStyleSheet(css_file)}}},confirmAdd:function(e,settings){var elm=tinyMCE.isIE?event.srcElement:e.target;var elementId=elm.name?elm.name:elm.id;tinyMCE.settings=settings;if(tinyMCE.settings.convert_on_click||(!elm.getAttribute('mce_noask')&&confirm(tinyMCELang.lang_edit_confirm)))tinyMCE.addMCEControl(elm,elementId);elm.setAttribute('mce_noask','true')},updateContent:function(form_element_name){var formElement,n,inst,doc;formElement=document.getElementById(form_element_name);for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.switchSettings();if(inst.formElement==formElement){doc=inst.getDoc();tinyMCE._setHTML(doc,inst.formElement.value);if(!tinyMCE.isIE)doc.body.innerHTML=tinyMCE._cleanupHTML(inst,doc,this.settings,doc.body,inst.visualAid)}}},addMCEControl:function(replace_element,form_element_name,target_document){var id="mce_editor_"+tinyMCE.idCounter++;var inst=new TinyMCE_Control(tinyMCE.settings);inst.editorId=id;this.instances[id]=inst;inst._onAdd(replace_element,form_element_name,target_document)},removeInstance:function(ti){var t=[],n,i;for(n in tinyMCE.instances){i=tinyMCE.instances[n];if(tinyMCE.isInstance(i)&&ti!=i)t[n]=i}tinyMCE.instances=t;n=[];t=tinyMCE.undoLevels;for(i=0;i<t.length;i++){if(t[i]!=ti)n.push(t[i])}tinyMCE.undoLevels=n;tinyMCE.undoIndex=n.length;tinyMCE.dispatchCallback(ti,'remove_instance_callback','removeInstance',ti);return ti},removeMCEControl:function(editor_id){var inst=tinyMCE.getInstanceById(editor_id),h,re,ot,tn,n;if(inst){inst.switchSettings();editor_id=inst.editorId;h=tinyMCE.getContent(editor_id);this.removeInstance(inst);tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;tinyMCE.selectedElement=null;tinyMCE.selectedInstance=null;for(n in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[n]))continue;tinyMCE.selectedInstance=tinyMCE.instances[n];break}re=document.getElementById(editor_id+"_parent");ot=inst.oldTargetElement;tn=ot.nodeName.toLowerCase();if(tn=="textarea"||tn=="input"){re.parentNode.removeChild(re);ot.style.display="inline";ot.value=h}else{ot.innerHTML=h;ot.style.display='block';re.parentNode.insertBefore(ot,re);re.parentNode.removeChild(re)}}},triggerSave:function(skip_cleanup,skip_callback){var inst,n;if(typeof(skip_cleanup)=="undefined")skip_cleanup=false;if(typeof(skip_callback)=="undefined")skip_callback=false;for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.triggerSave(skip_cleanup,skip_callback)}},resetForm:function(form_index){var i,inst,n,formObj=document.forms[form_index];for(n in tinyMCE.instances){inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;inst.switchSettings();for(i=0;i<formObj.elements.length;i++){if(inst.formTargetElementId==formObj.elements[i].name)inst.getBody().innerHTML=inst.startContent}}},execInstanceCommand:function(editor_id,command,user_interface,value,focus){var inst=tinyMCE.getInstanceById(editor_id),r;if(inst){r=inst.selection.getRng();if(typeof(focus)=="undefined")focus=true;if(focus&&(!r||!r.item))inst.contentWindow.focus();inst.autoResetDesignMode();this.selectedElement=inst.getFocusElement();inst.select();tinyMCE.execCommand(command,user_interface,value);if(tinyMCE.isIE&&window.event!=null)tinyMCE.cancelEvent(window.event)}},execCommand:function(command,user_interface,value){var inst=tinyMCE.selectedInstance,n,pe,te;user_interface=user_interface?user_interface:false;value=value?value:null;if(inst)inst.switchSettings();switch(command){case"Undo":if(this.getParam('custom_undo_redo_global')){if(this.undoIndex>0){tinyMCE.nextUndoRedoAction='Undo';inst=this.undoLevels[--this.undoIndex];inst.select();if(!tinyMCE.nextUndoRedoInstanceId)inst.execCommand('Undo')}}else inst.execCommand('Undo');return true;case"Redo":if(this.getParam('custom_undo_redo_global')){if(this.undoIndex<=this.undoLevels.length-1){tinyMCE.nextUndoRedoAction='Redo';inst=this.undoLevels[this.undoIndex++];inst.select();if(!tinyMCE.nextUndoRedoInstanceId)inst.execCommand('Redo')}}else inst.execCommand('Redo');return true;case'mceFocus':inst=tinyMCE.getInstanceById(value);if(inst)inst.getWin().focus();return;case"mceAddControl":case"mceAddEditor":tinyMCE.addMCEControl(tinyMCE._getElementById(value),value);return;case"mceAddFrameControl":tinyMCE.addMCEControl(tinyMCE._getElementById(value.element,value.document),value.element,value.document);return;case"mceRemoveControl":case"mceRemoveEditor":tinyMCE.removeMCEControl(value);return;case"mceToggleEditor":inst=tinyMCE.getInstanceById(value);if(inst){pe=document.getElementById(inst.editorId+'_parent');te=inst.oldTargetElement;if(typeof(inst.enabled)=='undefined')inst.enabled=true;inst.enabled=!inst.enabled;if(!inst.enabled){pe.style.display='none';if(te.nodeName=='TEXTAREA'||te.nodeName=='INPUT')te.value=inst.getHTML();else te.innerHTML=inst.getHTML();te.style.display=inst.oldTargetDisplay;tinyMCE.dispatchCallback(inst,'hide_instance_callback','hideInstance',inst)}else{pe.style.display='block';te.style.display='none';if(te.nodeName=='TEXTAREA'||te.nodeName=='INPUT')inst.setHTML(te.value);else inst.setHTML(te.innerHTML);inst.useCSS=false;tinyMCE.dispatchCallback(inst,'show_instance_callback','showInstance',inst)}}else tinyMCE.addMCEControl(tinyMCE._getElementById(value),value);return;case"mceResetDesignMode":if(tinyMCE.isGecko){for(n in tinyMCE.instances){if(!tinyMCE.isInstance(tinyMCE.instances[n]))continue;try{tinyMCE.instances[n].getDoc().designMode="off";tinyMCE.instances[n].getDoc().designMode="on";tinyMCE.instances[n].useCSS=false}catch(e){}}}return}if(inst){inst.execCommand(command,user_interface,value)}else if(tinyMCE.settings.focus_alert)alert(tinyMCELang.lang_focus_alert)},_createIFrame:function(replace_element,doc,win){var iframe,id=replace_element.getAttribute("id");var aw,ah;if(typeof(doc)=="undefined")doc=document;if(typeof(win)=="undefined")win=window;iframe=doc.createElement("iframe");aw=""+tinyMCE.settings.area_width;ah=""+tinyMCE.settings.area_height;if(aw.indexOf('%')==-1){aw=parseInt(aw);aw=(isNaN(aw)||aw<0)?300:aw;aw=aw+"px"}if(ah.indexOf('%')==-1){ah=parseInt(ah);ah=(isNaN(ah)||ah<0)?240:ah;ah=ah+"px"}iframe.setAttribute("id",id);iframe.setAttribute("name",id);iframe.setAttribute("class","mceEditorIframe");iframe.setAttribute("border","0");iframe.setAttribute("frameBorder","0");iframe.setAttribute("marginWidth","0");iframe.setAttribute("marginHeight","0");iframe.setAttribute("leftMargin","0");iframe.setAttribute("topMargin","0");iframe.setAttribute("width",aw);iframe.setAttribute("height",ah);iframe.setAttribute("allowtransparency","true");iframe.className='mceEditorIframe';if(tinyMCE.settings.auto_resize)iframe.setAttribute("scrolling","no");if(tinyMCE.isRealIE)iframe.setAttribute("src",this.settings.default_document);iframe.style.width=aw;iframe.style.height=ah;if(tinyMCE.settings.strict_loading_mode)iframe.style.marginBottom='-5px';if(tinyMCE.isRealIE)replace_element.outerHTML=iframe.outerHTML;else replace_element.parentNode.replaceChild(iframe,replace_element);if(tinyMCE.isRealIE)return win.frames[id];else return iframe},setupContent:function(editor_id){var inst=tinyMCE.instances[editor_id],i,doc=inst.getDoc(),head=doc.getElementsByTagName('head').item(0);var content=inst.startContent,contentElement,body;if(tinyMCE.settings.strict_loading_mode){content=content.replace(/&lt;/g,'<');content=content.replace(/&gt;/g,'>');content=content.replace(/&quot;/g,'"');content=content.replace(/&amp;/g,'&')}tinyMCE.selectedInstance=inst;inst.switchSettings();if(!tinyMCE.isIE&&tinyMCE.getParam("setupcontent_reload",false)&&doc.title!="blank_page"){try{doc.location.href=tinyMCE.baseURL+"/blank.htm"}catch(ex){}window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",1000);return}if(!head||!doc.body){window.setTimeout("tinyMCE.setupContent('"+editor_id+"');",10);return}tinyMCE.importCSS(inst.getDoc(),tinyMCE.baseURL+"/themes/"+inst.settings.theme+"/css/editor_content.css");tinyMCE.importCSS(inst.getDoc(),inst.settings.content_css);tinyMCE.dispatchCallback(inst,'init_instance_callback','initInstance',inst);if(tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')){inst.addShortcut('ctrl','z','lang_undo_desc','Undo');inst.addShortcut('ctrl','y','lang_redo_desc','Redo')}for(i=1;i<=6;i++)inst.addShortcut('ctrl',''+i,'','FormatBlock',false,'<h'+i+'>');inst.addShortcut('ctrl','7','','FormatBlock',false,'<p>');inst.addShortcut('ctrl','8','','FormatBlock',false,'<div>');inst.addShortcut('ctrl','9','','FormatBlock',false,'<address>');if(tinyMCE.isGecko){inst.addShortcut('ctrl','b','lang_bold_desc','Bold');inst.addShortcut('ctrl','i','lang_italic_desc','Italic');inst.addShortcut('ctrl','u','lang_underline_desc','Underline')}if(tinyMCE.getParam("convert_fonts_to_spans"))inst.getBody().setAttribute('id','mceSpanFonts');if(tinyMCE.settings.nowrap)doc.body.style.whiteSpace="nowrap";doc.body.dir=this.settings.directionality;doc.editorId=editor_id;if(!tinyMCE.isIE)doc.documentElement.editorId=editor_id;inst.setBaseHREF(tinyMCE.settings.base_href);if(tinyMCE.settings.convert_newlines_to_brs){content=tinyMCE.regexpReplace(content,"\r\n","<br />","gi");content=tinyMCE.regexpReplace(content,"\r","<br />","gi");content=tinyMCE.regexpReplace(content,"\n","<br />","gi")}content=tinyMCE.storeAwayURLs(content);content=tinyMCE._customCleanup(inst,"insert_to_editor",content);if(tinyMCE.isIE){window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["'+editor_id+'"].getDoc(), "'+editor_id+'");}catch(e){}',500);if(tinyMCE.settings.force_br_newlines)doc.styleSheets[0].addRule("p","margin: 0;");body=inst.getBody();body.editorId=editor_id}content=tinyMCE.cleanupHTMLCode(content);if(!tinyMCE.isIE){contentElement=inst.getDoc().createElement("body");doc=inst.getDoc();contentElement.innerHTML=content;if(tinyMCE.settings.cleanup_on_startup)tinyMCE.setInnerHTML(inst.getBody(),tinyMCE._cleanupHTML(inst,doc,this.settings,contentElement));else tinyMCE.setInnerHTML(inst.getBody(),content);tinyMCE.convertAllRelativeURLs(inst.getBody())}else{if(tinyMCE.settings.cleanup_on_startup){tinyMCE._setHTML(inst.getDoc(),content);try{tinyMCE.setInnerHTML(inst.getBody(),tinyMCE._cleanupHTML(inst,inst.contentDocument,this.settings,inst.getBody()))}catch(e){}}else tinyMCE._setHTML(inst.getDoc(),content)}tinyMCE.handleVisualAid(inst.getBody(),true,tinyMCE.settings.visual,inst);tinyMCE.dispatchCallback(inst,'setupcontent_callback','setupContent',editor_id,inst.getBody(),inst.getDoc());if(!tinyMCE.isIE)tinyMCE.addEventHandlers(inst);if(tinyMCE.isIE){tinyMCE.addEvent(inst.getBody(),"blur",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(inst.getBody(),"beforedeactivate",TinyMCE_Engine.prototype._eventPatch);if(!tinyMCE.isOpera){tinyMCE.addEvent(doc.body,"mousemove",TinyMCE_Engine.prototype.onMouseMove);tinyMCE.addEvent(doc.body,"beforepaste",TinyMCE_Engine.prototype._eventPatch);tinyMCE.addEvent(doc.body,"drop",TinyMCE_Engine.prototype._eventPatch)}}inst.select();tinyMCE.selectedElement=inst.contentWindow.document.body;tinyMCE._customCleanup(inst,"insert_to_editor_dom",inst.getBody());tinyMCE._customCleanup(inst,"setup_content_dom",inst.getBody());tinyMCE._setEventsEnabled(inst.getBody(),false);tinyMCE.cleanupAnchors(inst.getDoc());if(tinyMCE.getParam("convert_fonts_to_spans"))tinyMCE.convertSpansToFonts(inst.getDoc());inst.startContent=tinyMCE.trim(inst.getBody().innerHTML);inst.undoRedo.add({content:inst.startContent});if(tinyMCE.isGecko){tinyMCE.selectNodes(inst.getBody(),function(n){if(n.nodeType==3||n.nodeType==8)n.nodeValue=n.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)=\"[^\"]*\"','gi'),"");return false})}if(tinyMCE.isGecko)inst.getBody().spellcheck=tinyMCE.getParam("gecko_spellcheck");tinyMCE._removeInternal(inst.getBody());inst.select();tinyMCE.triggerNodeChange(false,true)},storeAwayURLs:function(s){if(!s.match(/(mce_src|mce_href)/gi,s)){s=s.replace(new RegExp('src\\s*=\\s*\"([^ >\"]*)\"','gi'),'src="$1" mce_src="$1"');s=s.replace(new RegExp('href\\s*=\\s*\"([^ >\"]*)\"','gi'),'href="$1" mce_href="$1"')}return s},_removeInternal:function(n){if(tinyMCE.isGecko){tinyMCE.selectNodes(n,function(n){if(n.nodeType==3||n.nodeType==8)n.nodeValue=n.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)=\"[^\"]*\"','gi'),"");return false})}},removeTinyMCEFormElements:function(form_obj){var i,elementId;if(!tinyMCE.getParam('hide_selects_on_submit'))return;if(typeof(form_obj)=="undefined"||form_obj==null)return;if(form_obj.nodeName!="FORM"){if(form_obj.form)form_obj=form_obj.form;else form_obj=tinyMCE.getParentElement(form_obj,"form")}if(form_obj==null)return;for(i=0;i<form_obj.elements.length;i++){elementId=form_obj.elements[i].name?form_obj.elements[i].name:form_obj.elements[i].id;if(elementId.indexOf('mce_editor_')==0)form_obj.elements[i].disabled=true}},handleEvent:function(e){var inst=tinyMCE.selectedInstance,i,elm,keys;if(typeof(tinyMCE)=="undefined")return true;if(tinyMCE.executeCallback(tinyMCE.selectedInstance,'handle_event_callback','handleEvent',e))return false;switch(e.type){case"beforedeactivate":case"blur":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.execCommand('mceEndTyping');tinyMCE.hideMenus();return;case"drop":case"beforepaste":if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.setBaseHREF(null);if(tinyMCE.isRealIE){var ife=tinyMCE.selectedInstance.iframeElement;if(ife.style.height.indexOf('%')!=-1){ife._oldHeight=ife.style.height;ife.style.height=ife.clientHeight}}window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings.base_href);tinyMCE._resetIframeHeight();",1);return;case"submit":tinyMCE.formSubmit(tinyMCE.isMSIE?window.event.srcElement:e.target);return;case"reset":var formObj=tinyMCE.isIE?window.event.srcElement:e.target;for(i=0;i<document.forms.length;i++){if(document.forms[i]==formObj)window.setTimeout('tinyMCE.resetForm('+i+');',10)}return;case"keypress":if(inst&&inst.handleShortcut(e))return false;if(e.target.editorId){tinyMCE.instances[e.target.editorId].select()}else{if(e.target.ownerDocument.editorId)tinyMCE.instances[e.target.ownerDocument.editorId].select()}if(tinyMCE.selectedInstance)tinyMCE.selectedInstance.switchSettings();if((tinyMCE.isGecko||tinyMCE.isOpera||tinyMCE.isSafari)&&tinyMCE.settings.force_p_newlines&&e.keyCode==13&&!e.shiftKey){if(TinyMCE_ForceParagraphs._insertPara(tinyMCE.selectedInstance,e)){tinyMCE.execCommand("mceAddUndoLevel");return tinyMCE.cancelEvent(e)}}if((tinyMCE.isGecko&&!tinyMCE.isSafari)&&tinyMCE.settings.force_p_newlines&&(e.keyCode==8||e.keyCode==46)&&!e.shiftKey){if(TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance,e.type)){tinyMCE.execCommand("mceAddUndoLevel");return tinyMCE.cancelEvent(e)}}if(tinyMCE.isIE&&tinyMCE.settings.force_br_newlines&&e.keyCode==13){if(e.target.editorId)tinyMCE.instances[e.target.editorId].select();if(tinyMCE.selectedInstance){var sel=tinyMCE.selectedInstance.getDoc().selection;var rng=sel.createRange();if(tinyMCE.getParentElement(rng.parentElement(),"li")!=null)return false;e.returnValue=false;e.cancelBubble=true;rng.pasteHTML("<br />");rng.collapse(false);rng.select();tinyMCE.execCommand("mceAddUndoLevel");tinyMCE.triggerNodeChange(false);return false}}if(e.keyCode==8||e.keyCode==46){tinyMCE.selectedElement=e.target;tinyMCE.linkElement=tinyMCE.getParentElement(e.target,"a");tinyMCE.imgElement=tinyMCE.getParentElement(e.target,"img");tinyMCE.triggerNodeChange(false)}return false;case"keyup":case"keydown":tinyMCE.hideMenus();tinyMCE.hasMouseMov