Problem inserting code snippet at start of html in CE6

Last post 01-23-2008, 2:29 AM by Adam. 1 replies.
Sort Posts: Previous Next
  •  01-22-2008, 7:11 AM 36461

    Problem inserting code snippet at start of html in CE6

    Maybe I'm being dim but I'm having a small problem with CE 6. I'm running the latest version (as far as I'm aware) and ASP.Net 2 with Windows Server 2003.
     
    I have a code snippet which looks a little bit like this:
     
    <span style="float:right">some text</span> <span style="font-weight: bold">some more text</span>
     
    This snippet is repeatedly inserted at the start of a CuteEditor document/html so that the snippets form a list and the newest is at the top.
     
    The problem is that when I click at the very start of the html, the cursor always moves inside the first <span> tag in the html I'm editing. When I then insert new content or type anything in, it always ends up inside that <span> instead of at the very start.
     
    Am I missing something? Is there a button or a technique (without using the html mode preferrably) to allow me to insert content right at the very start and not in the first tag.
     
    Hope this makes sense.
     
  •  01-23-2008, 2:29 AM 36479 in reply to 36461

    Re: Problem inserting code snippet at start of html in CE6

    pbeddis,
     
    Code Snippet dropdown implements the following API:
     
    PasteHTML()
    This method is used for pasting the specified HTML into a range within an editor document. If anything is selected, the selection is replaced with the new HTML and text.
    Example:

    // get the cute editor instance
    var editor1 = document.getElementById('<% = Editor1.ClientID%>');

    // pasting the specified HTML into a range within a editor document
    editor1.PasteHTML("Hello World");

     
    This API allows you paste any content into the editor at the cursor position.
     
    If you want to paste the content in the beginning of the editor, you have to move the cursor position first.
     
    If you are updating the whole document, please check the following API. It will move the cursor position ton the beginning of the document.
     
    SetHTML() This method is used for setting the content of CuteEditor.

    Example:

    // get the cute editor instance
    var editor1 = document.getElementById('<% = Editor1.ClientID%>');

    // setting the content of Cute Editor
    editor1.setHTML("Hello World");

    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