How we can default the cell padding, cell border, cell alignment properties.

Last post 11-25-2005, 6:43 PM by Adam. 6 replies.
Sort Posts: Previous Next
  •  10-19-2005, 11:58 AM 11840

    How we can default the cell padding, cell border, cell alignment properties.

      
    1)     When ever we insert a table in cute editor, 
            By default its cell padding is 3 and cell border is 1

            Is there any way so that we can default the values of the
    cell padding and cell border to be 0.

    2)     Also how we can set the default values of the cell alignment to be “left”
            and cell vertical alignment to be – “top”.

     


     
         
  •  10-19-2005, 12:44 PM 11842 in reply to 11840

    Re: How we can default the cell padding, cell border, cell alignment properties.

    Please modify the CuteEditorconstants.js file.

    // You can modify the following function to change the table default properties within the InsertTable dialog
    var _CreateEditingTableStyle = "<table border='1' cellspacing='0' cellpadding='3' style='border-collapse:collapse;width:320'>";
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  10-19-2005, 1:24 PM 11847 in reply to 11842

    Re: How we can default the cell padding, cell border, cell alignment properties.

    Thank you Adam,
     
        i am able to set the default values for table border and table cellpadding.
     
        please also help me out, if there is any way,
            
        so that we can also set the default values for the cell alignment to be “left”
        and cell vertical alignment to be “top”.
     
       
  •  11-16-2005, 11:26 AM 12720 in reply to 11842

    Re: How we can default the cell padding, cell border, cell alignment properties.

    Not able to find in CuteEditorconstants.js file, the following "var _CreateEditingTableStyle" :-

    ---------------------------------------------------------------------------------------------------------------------------
    // You can modify the following function to change the table default properties within the InsertTable dialog
    var _CreateEditingTableStyle = "<table border='1' cellspacing='0' cellpadding='3' style='border-collapse:collapse;width:320'>";
    ---------------------------------------------------------------------------------------------------------------------------
     
    We want to set the default value of cell padding = '0' , cell border = '0' , cell alignment to 'left'
    and cell vertical allignment to 'top'.
     
    Thanking you.
  •  11-16-2005, 12:45 PM 12728 in reply to 12720

    Re: How we can default the cell padding, cell border, cell alignment properties.

    You can find the CuteEditorconstants.js under CuteSoft_clients/CuteEditor.

    >>We want to set the default value of cell padding = '0' , cell border = '0' 

    Table cell doesn't have those properties.  Check this link: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/td.asp

    >>cell alignment to 'left' and cell vertical allignment to 'top'. 
     
    When creating a new table, align and vAlign are not set by default.
     
    <table cellSpacing="0" cellPadding="3" border="1" style="width: 320px; border-collapse: collapse">
           <tbody>
               <tr>
                  <td></td>
                  <td></td>
                  <td></td>
               </tr>
               <tr>
                  <td></td>
                  <td></td>
                  <td></td>
               </tr>
           </tbody>
       </table> 

    You need to set align and vAlign using the table cell property dialog.

      <table cellSpacing="0" cellPadding="3" border="1" style="width: 320px; border-collapse: collapse">
           <tbody>
               <tr>
                  <td vAlign="top" align="left"></td>
                  <td></td>
               </tr>
               <tr>
                  <td></td>
                  <td></td>
               </tr>
               <tr>
                  <td></td>
                  <td></td>
               </tr>
           </tbody>
       </table>
       <br/>
    </div>
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-16-2005, 1:05 PM 12731 in reply to 12728

    Re: How we can default the cell padding, cell border, cell alignment properties.

    when we create new table we get following HTML :-
     
    <table style="WIDTH: 320px; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=3 border=1>

    but is it possible that we can get :-
     
    <table style="WIDTH: 320px; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 border=0>

    we was able to get in version 4 , after modifying CuteEditorconstants.js file.

    thanking you.
  •  11-25-2005, 6:43 PM 13062 in reply to 12731

    Re: How we can default the cell padding, cell border, cell alignment properties.

    gurpreet,
     
    You can do the same thing in the version 5.x.
     
    // When creating a table using the Wizard, the following default attributes apply.var _CreateEditingTableStyle = "<table border='1' cellspacing='0' cellpadding='3' style='border-collapse:collapse;width:320'>";

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML