CssClass use <div> instead of <span>

Last post 11-25-2008, 4:14 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  11-25-2008, 1:20 PM 46288

    CssClass use <div> instead of <span>

    I'm wondering if it's possible to configure CuteEditor to use a <div> tag instead of a <span> tag when selecting a custom CssClass.
     
    For example, I created a custom class, and when the text is selected to use that class from the drop down, the following code is generated <span class="className">Text</span>
     
    I need this to be <div class="className">Text</div>
     
    Is it possible to change this? The reason is, the users are pasting text from Word, and it's pasting <span> tags with styles, and I'm using RegEx to strip the span tags, but allowing them to set classes on text, but my RegEx strips the <span> tags, thus, stripping the classes set by the user.
     
    Any help is appreciated.
  •  11-25-2008, 4:14 PM 46289 in reply to 46288

    Re: CssClass use <div> instead of <span>

    No, it's not possible.
     
    Because Div is a block level tag. If we use it as inline tag, the structure of the page/content will be changed.
     
    Please compare the following HTML code:
     
    Original code:
     
    Hello World
     
    Span:
     
    He<span class="class1">ll</span>o Wo<span class="class2">r</span>l<span class="class3">d</span></p>
     
    Div:
     
    He<div class="class1">ll</div>o Wo<div class="class2">r</div>l<div class="class3">d</div></p>
     
    With Div tag,  the structure of the above code is totally changed.
     
    Hope it helps.
     
    let me know if you have any further questions.

    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