setting default html

Last post 04-04-2012, 1:38 PM by gurpreet. 2 replies.
Sort Posts: Previous Next
  •  04-03-2012, 1:40 PM 73603

    setting default html


    when we add table with 1 row and 2 cols, default html is -

    <table border="0" cellspacing="0" cellpadding="0" width="500">
    <tr>
    <td> </td>
    <td> </td>
    </tr>
    </table>
     
    can we change the default html to be as under, so that every time we add table "TR" is vertically top aligned -
     
    <table border="0" cellspacing="0" cellpadding="0" width="500">
    <tr valign="top">
    <td> </td>
    <td> </td>
    </tr>
    </table>
  •  04-04-2012, 1:09 PM 73610 in reply to 73603

    Re: setting default html

    Hi gurpreet,
    You can use html filter to switch the <tr> target, but it will switch all <tr> target too.
     
    Add the code below to the bottom of your page will achieve the html filter I mentioned above
     
    <script type="text/javascript">      
    function CuteEditor_FilterHTML(editor,code)   
    {   
        return code.split('<tr>').join('<tr valign="top">'); 
    }   
    function CuteEditor_FilterCode(editor,code)   
    {   
       return code.split('<tr>').join('<tr valign="top">'); 
    }   
    </script>  
     
     
    Regards,
     
    Ken 
  •  04-04-2012, 1:38 PM 73614 in reply to 73610

    Re: setting default html

    thanks Ken,
     we will try and check that out.
     
     
View as RSS news feed in XML