Space Problem

Last post 09-13-2007, 11:14 AM by Adam. 3 replies.
Sort Posts: Previous Next
  •  09-06-2007, 5:17 AM 33295

    Space Problem

    Hi all, I have a problem with some spaces added by the editor.
     
    I want to put two images one under the other in a div that has a width of 230px.
     
    I can simply add this code:
     
    <img height="307" alt="" src="image01.gif" width="230" border="0" /><img height="20" alt="" src="image02.gif" width="230" border="0" />
     
    BUT
     
    when I save the editor adds a space between the two images
     
    <img height="307" alt="" src="image01.gif" width="230" border="0" /> <img height="20" alt="" src="image02.gif" width="230" border="0" />
     
    so, IE shows some space between the two images.
    I tried inserting the images in a table but, even if I manually correct the html:
     
    <table cellspacing="0" cellpadding="0" border="0">
        <tr>
                <td><img height="307" alt="" src="image01.gif" width="230" border="0" /></td>
            </tr>
            <tr>
                <td><img height="20" alt="" src="image02.gif" width="230" border="0" /></td>
            </tr>
        </table>
     
    saving, the editor adds a space after the image tag .......
    If I switch between preview and html the code remains safe. The space is added only upon saving
     
     
    <table cellspacing="0" cellpadding="0" border="0">
        <tr>
                <td><img height="307" alt="" src="image01.gif" width="230" border="0" /> </td>
            </tr>
            <tr>
                <td><img height="20" alt="" src="image02.gif" width="230" border="0" /> </td>
            </tr>
        </table>
    Any hints?
     
    Thanks
    Andrea
     
     
     
    [*** UPDATE ***]
    If I insert some text in the first cell, everything is ok.
     
    So, if I use this HTML
     
    <table cellspacing="0" cellpadding="0" border="0">
        <tr>
                <td><img height="307" alt="" src="image01.gif" width="230" border="0" /></td>
            </tr>
            <tr>
                <td><img height="20" alt="" src="image02.gif" width="230" border="0" /></td>
            </tr>
        </table>
     
    the editor saves
     
    <table cellspacing="0" cellpadding="0" border="0">
        <tr>
                <td><img height="307" alt="" src="image01.gif" width="230" border="0" /> </td>
            </tr>
            <tr>
                <td><img height="20" alt="" src="image02.gif" width="230" border="0" /> </td>
            </tr>
        </table>

    with extra spaces; but if I use this HTML
     
    <table cellspacing="0" cellpadding="0" border="0">
        <tr>
                <td>TEST<br /><img height="307" alt="" src="image01.gif" width="230" border="0" /></td>
            </tr>
            <tr>
                <td><img height="20" alt="" src="image02.gif" width="230" border="0" /></td>
            </tr>
        </table>
     
    everything works fine......
     

     
  •  09-11-2007, 10:04 AM 33455 in reply to 33295

    Re: Space Problem

    WileECoyote,
     
    Please check the following example:
     
     
    If you cannot reproduce the problems there, please download the latest version 6.0.
     
    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

  •  09-11-2007, 11:33 AM 33461 in reply to 33455

    Re: Space Problem

    Hi Adam,
    found the problem.
     
    If I use "ceEditor.XHTML" to get the editor content, I get extra spaces.
    If I use "ceEditor.Text" everything is ok.
     
    Please, can you check this?
     
    Regards
    Wile E
  •  09-13-2007, 11:14 AM 33537 in reply to 33461

    Re: Space Problem

    It's not spaces. It's only for indentation. If you don't like this, please use the following code:
     
    string myXHTML=EditorUtility.ConvertToXml(Editor1.Text,false,true,false);
     
    Demo:
     
     
    XHTML (no indentation)::


    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