Table width formatting problem...

Last post 07-12-2004, 12:41 PM by Aluminum. 3 replies.
Sort Posts: Previous Next
  •  06-25-2004, 12:31 PM 1103

    Table width formatting problem...

    We have a problem. We're bringing over tables from legacy FP/MSWORD documents. In doing so, the table comes across with the WIDTH attributes set for both the TABLE tag and the TD tag.

     
    We can change the width of the table to 100% in the table editor window, but that then sets the width using a STYLE attribute...leaving both the WIDTH attributes in the TABLE and TD tags.
     
    Is there any way to strip out these attributes from those tags? Code cleaner nor clear formatting seem to work.
     
    -Darrel
  •  06-26-2004, 11:01 AM 1104 in reply to 1103

    Re: Table width formatting problem...

    Darrel,

     
    Have you tried using the paste from word button?
     
    It should strip out all the word style attributes.
     
    Keep me posted
     
     
     

    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

  •  06-30-2004, 1:04 PM 1132 in reply to 1104

    Re: Table width formatting problem...

    Nope. That doesn't work either. The issue is that the table/tr/td ATTRIBUTES are being preserved, and the table editor only edits table STYLES.

     
    What we need is a table attribute stripper function.
  •  07-12-2004, 12:41 PM 1227 in reply to 1132

    Re: Table width formatting problem...

    Allright, we ended up fixing this ourselves.


    For the record, in case anyone else runs into this problem, here's what we did:
     
    We set up a function that uses a regex to search for any TABLE tag. We then strip out the attribute values for cellpadding and cellspacing (setting them to 0) and set the border to 1.
     
    This allows the editors to now double-click the tables to edit them.
     
    We then added a button that sets the border back to 0 after they're done editing.
     
    Both these buttons are called outside of the editor and processed on the server-side. If I have the time, I may try and whip up a javascript version for client-side editing. I'm hoping this bug will be fixed in CuteEditor by then, though. ;o) ;o) ;o)
View as RSS news feed in XML