contentEditable=false

Last post 11-25-2009, 3:01 AM by cheeves. 4 replies.
Sort Posts: Previous Next
  •  11-18-2009, 5:07 AM 57240

    contentEditable=false

    Hi, we are trying to allow users to insert span tags with contentEditable=false, but when this is the only content in the editor we cannot type anymore text.
    what seams to be happening is  that the cursor cannot move out of the span tag.
     
    here is a sample some code where we set the Text property of the editor -
    Editor1.Text = "<span class='Embedded_Table' contenteditable='false' ><table style='position: relative; border-bottom-color: #000000; border-top-color: #000000; border-collapse: collapse; table-layout: fixed; border-right-color: #000000; border-left-color: #000000' class='EmbeddedTable' border='1' bordercolor='#000000' cellpadding='3'>    <colgroup>    <col style='text-align: left; width: 30mm; vertical-align: top'></colgroup>    <thead style='font-style: normal; font-family: inherit; font-weight: bold; text-decoration: none'><tr><td style='text-align: center; font-style: normal; font-family: inherit; font-weight: bold; text-decoration: none'>0002</td></tr><tr><td style='font-style: normal; font-family: inherit;background: #b0d3dc; font-weight: bold; text-decoration: none'>Name</td></tr></thead><tbody style='font-style: normal; font-family: inherit; font-weight: normal; text-decoration: none'></table></span>"; 
  •  11-18-2009, 9:37 AM 57252 in reply to 57240

    Re: contentEditable=false

    cheeves,
     
    Please try:
     
    <div contenteditable="false" unselectable="ON">
    <table style="position: relative; border-bottom-color: #000000; border-top-color: #000000; border-collapse: collapse; table-layout: fixed; border-right-color: #000000; border-left-color: #000000" class="EmbeddedTable" border="1" bordercolor="#000000" cellpadding="3">
        <colgroup>
        <col style="text-align: left; width: 30mm; vertical-align: top"></colgroup>
        <thead style="font-style: normal; font-family: inherit; font-weight: bold; text-decoration: none">
            <tr>
                <td style="text-align: center; font-style: normal; width: 119px; font-family: inherit; height: 19px; font-weight: bold; text-decoration: none">0002</td>
            </tr>
            <tr>
                <td style="font-style: normal; font-family: inherit;background: #b0d3dc; font-weight: bold; text-decoration: none">Name</td>
            </tr>
        </thead>
        <tbody style="font-style: normal; font-family: inherit; font-weight: normal; text-decoration: none">
        </tbody>
    </table>
    </div>
     
    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

  •  11-18-2009, 11:59 AM 57260 in reply to 57252

    Re: contentEditable=false

    Hi Adam,
    thanks very much for your fast response, but unfortunately that doesn't help. 
    A quick test, to see what is happening, is to copy the markup you've provided into the html tab of the demo page (http://cutesoft.net/example/general.aspx)

     
    Thanks
    cheeves 
  •  11-18-2009, 1:38 PM 57262 in reply to 57260

    Re: contentEditable=false

    cheeves:
    Hi Adam,
    thanks very much for your fast response, but unfortunately that doesn't help. 
    A quick test, to see what is happening, is to copy the markup you've provided into the html tab of the demo page (http://cutesoft.net/example/general.aspx)

     
    Thanks
    cheeves 

    cheeves
     
    In the Edit view, you can not type because the whole editing are is taken by uneditable div. You can go to code view and type <br>, then switch back to edit view.
     
    There is no point to add full Uneditable Regions into editor.  Uneditable Regions should be part of the whole html view, sections of the content.
     
    If you want to set the whole editor uneditable, you should set editor ReadOnly.
     
    Here is the demo:
     

    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-25-2009, 3:01 AM 57411 in reply to 57262

    Re: contentEditable=false

    Hi Adam,
    has this behavior changed in the new version of the editor? 
     
    Thanks
    cheeves 
View as RSS news feed in XML