in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

ASPxHTMLEditor contentEditable attribute

Last post 11/11/2008 6:19 AM by Victor A (Developer Express). 4 replies.
Page 1 of 1 (5 items)
Sort Posts:
Previous Next
  • 10/2/2008 8:32 AM

    ASPxHTMLEditor contentEditable attribute

     Good day

    i want to ask why ASPxHTMLEditor editor removes attribute from andy div or span when switching modes from design and html view, acctually it removes them everytime on postback also is it possible allways to have not editable div or span or other element?

  • 10/7/2008 3:54 AM In reply to

    Re: ASPxHTMLEditor contentEditable attribute

    Hi Albertas,

    The ASPxHtmlEditor has an internal HTML processor, which converts any
    'invalid' HTML markup into XHTML 1.0 Transitional compliant one. The
    'contentEditable' attribute doesn't exist in the XHTML 1.0 Transitional
    specification. That's why it was removed.

    Of course you can turn off the entire HTML processing, but in this case you'll
    get HTML markup, which is not guaranteed to be XHTML 1.0 Trans compliant
    and even XHTML at all. To cancel HTML processing, handle the HtmlCorrecting
    event of the ASPxHtmlEditor in the following manner:

    ASPX:

    <dxhe:ASPxHtmlEditor ... OnHtmlCorrecting="OnHtmlCorrecting" />

    CS:

    protected void OnHtmlCorrecting(object sender, HtmlCorrectingEventArgs e) {

        e.Handled = true;

    }

    --
    Victor

    Victor
    R&D, ASP.NET Team, DevExpress Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
  • 10/7/2008 4:50 AM In reply to

    Re: ASPxHTMLEditor contentEditable attribute

    Hi Victor, thanks a lot, you answered my question Smile

  • 11/10/2008 2:24 PM In reply to

    Re: ASPxHTMLEditor contentEditable attribute

    Another interesting thing i would like to ask why the qoutes are remove around id attribute? 

    i am inserting text in custom client side event function like so:

    s.ExecuteCommand(ASPxClientCommandConsts.PASTEHTML_COMMAND,'<label id=&quot;1&quot;>tekst</label>)

    Thanks

  • 11/11/2008 6:19 AM In reply to

    Re: ASPxHTMLEditor contentEditable attribute

    Hi Albertas,

    I tried to reproduce your issue, but failed. I ran your code in all available
    browsers, and it worked as expected. Could you provide more information
    about the issue, including your product version, type and the version of the
    browser you use and, if possible, the complete code, which causes the problem.

    Victor
    R&D, ASP.NET Team, DevExpress Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
Page 1 of 1 (5 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED