Setting a default Width and Height for tables

Last post 09-28-2005, 5:08 PM by ngaudreau. 5 replies.
Sort Posts: Previous Next
  •  09-27-2005, 9:13 PM 11111

    Setting a default Width and Height for tables

    Is there anyway to have it so that when you use the Insert Table button, there is an already set default Width and Heigh in the fields (instead of what is there now:  200 pixels for Width and 300 pixels for Height)?

    For example, I'd like to have the Width already be set to 95 Percent, and the Height to 100 Percent.
     
    I am using CuteEditor for ASP v4.2
     
    Thank you,
    Nathan
  •  09-28-2005, 11:51 AM 11132 in reply to 11111

    Re: Setting a default Width and Height for tables

    Nathan,
     
    Open the Insert_table.asp, find the following code:
     
    p_table=document.createElement('<table style="width:300px;Height:200px;"  border=1 cellspacing=4 cellpadding=4></table>');
     
    You can change it to meet your own requirements.
     
     

    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

  •  09-28-2005, 12:48 PM 11136 in reply to 11132

    Re: Setting a default Width and Height for tables

    Adam,
    Thank you for your reply, that worked.  However, now whenever I revisit the Table Properties, it displays the Width and Height as the default values I set, rather than retaining the values that have been changed by a user.
     
    Also, I noticed that when you change the Alignment of a table, then revisit the Table Properties, it does not retain the value.
     
    For example, if I change the Alignment to "Right" then click OK, then double-click on the table in the editor to pull up the Table Properties, the Alignment is set back to "Baseline."
  •  09-28-2005, 1:15 PM 11140 in reply to 11136

    Re: Setting a default Width and Height for tables

    I'm looking around, and it seems that there is a problem with this code:
     
      var arg=top.dialogArguments;
      var element=arg.element;
     
     if(element)
      {
       p_table=element;
      }
     
    That is in Insert_Table.asp.  Even after I've created a table, the variable "element" remains null.  It never gets into that if statement, so it always does the the else case, which creates a new table with the default values..
  •  09-28-2005, 1:20 PM 11141 in reply to 11140

    Re: Setting a default Width and Height for tables

    And one more thing, this problem with not retaining values seems to occur on http://www.cutesoft.net/asp/EnableAll.asp as well.
  •  09-28-2005, 5:08 PM 11150 in reply to 11141

    Re: Setting a default Width and Height for tables

    I've made the value retaining problem its own post:
     
View as RSS news feed in XML