Re: Many problems editing text with Cute Editor and DNN

  •  09-16-2005, 5:43 AM

    Re: Many problems editing text with Cute Editor and DNN

    Yes many of the problems DO occur on that demo.
     
    Try the following, I'll outline the problems in bold:
     
    1)  Go to DNN Edit Demo and click 'Edit Text' on the Text/HTML module
    2)  Press the 'Select All' button (the dark arrow with the + button next to it).  Nothing gets selected, and the Underline button becomes highlighted!
    3)  Ok, press the 'Select All' button again - all of the content now gets selected (?!)
    4)  Now press backspace or delete to delete the content - great you think, its deleted - but go into HTML view to see that a <p>&#160;</p> has been left in the HTML
    5)  Ok, no problem, just delete that in HTML view, now back to Normal view and press enter once.  Now go back to HTML view and see that you now have <div>&#160;</div><div></div> in the HTML
    6)  Hmm, ok so lets delete that in HTML view, and now with nothing there, press enter in HTML view.  Oh look, the cursor has gone done two lines!!
    7)  No problem, just hit backspace and then hold shift and press enter, great - its now gone down one line as we want.  Ok backspace again, and back into Normal view.
    8)  Insert a table with 2 columns and 1 row.   Ok, go into HTML view - ugh why is a style being used to set the width of the table?  Not very good code at all.  No problem, just replace the style= property with width="100%".  It's also put the table in a div (talk about divitus), so lets delete that and back into Normal view (it's lucky I know HTML, otherwise I would be in trouble!)
    9)  Ok, lets insert a picture into the left column, that's nice, but we want the picture a bit bigger, so lets drag a handle to the right to increase its width.  Back into HTML view, hmmm, what's this?  we have <img height="224" src="/Portals/0/Guest/foto-170.jpg" width="182" style="width: 182px; height: 224px" />  A bit unnessacery me thinks?  Ok, lets delete the style property again, and back into Normal view.
    10)  Ok, let's type some text in the right hand column.  Type Hello, and select a Css Class for it - oh, the demo doesn't have any Css Classes, so why is the dropdown available I wonder?
    11)  Never mind, lets put the cursor at the end of Hello and press enter twice, now backspace twice - into HTML view, our nice <td>Hello</td> has been turned into <td><div>Hello</div></td>  Fair enough, back into Normal view, click at the end of Hello and press enter twice again, back into HTML view, hmm we now have:
                <td>
                      <div>Hello</div>
                      <div>&#160;</div>
                      <div></div>
                  </td>
    What a mess, we can tidy it up in HTML, but what's the point?  Delete all the HTML, and back to Normal view with a clean screen, and let's have some fun with hyperlinks.
    12)  Ok type Hello on the first line, and How are you on the second line - the demo goes down one line when pressing enter in Normal view, on my site, it goes down two lines, I've no idea why.  Let's select both lines (click and drag to highlight all), and press the hyperlink button and set the URL to http://www.google.com (don't forget the http:// or you WILL be in trouble!)
    13)  Ok, let's have a look at the HTML produced:

    <div><a href="http://www.google.com">
       <div>Hello</div>
       <div>How are you</div></a>
    </div>

    Ok, not great, but it's a start, back into Normal view.  We want to change the How are you link to point to www.msn.com, so lets click and drag to select How are you, click the hyperlink button, and change the url to http://www.msn.com.  Back to HTML view, oh that's no good, we now have:

    <div><a href="http://www.msn.com">
       <div>Hello</div>
       <div>How are you</div></a>
    </div>

     
    14)  Ok, back to Normal view, click and drag to select everything, and then press delete.  Great, that's got rid of that mess, back into HTML view - oh we still have:
     
    <div><a href="http://www.msn.com/">
       <div></div></a>
    </div>
     
    15)  I give in, there are numerous other problems I could mention - like the hspace property being added to images for god knows what reason, and when you have some classes to select in the drop down, the great fun you can have trying to get them to work.
     
    Could you give this a try Adam, and see how you get on?
View Complete Thread