6.0 PasteHTML() command not working right.

Last post 04-18-2007, 4:25 AM by Adam. 3 replies.
Sort Posts: Previous Next
  •  04-17-2007, 12:44 PM 28499

    6.0 PasteHTML() command not working right.

    I am using CE to allow my users to create mail-merge letter templates.  To allow the mail-merge, I have some special insertable tags they can use in their templates that get replaced by data from a database.  For example, the tag {LASTNAME} gets replaced, when the letter is printed, by the customer's last name.
     
    Users insert these tags using a custom button on the CE toolbar.  This button executes the following JavaScript code:
     
    var t = document.FormName.txselected="true"Tag.value; var e = CuteEditor_GetEditor(this); e.PasteHTML(t);
     
    (Please note, your editor insists on inserting the text  ="true" into the middle of my code example.  The actual text above should read "var t = document.FormName.txselected="true"Tag.value".  You might want to look into this odd behavior, also. PLEASE NOTE:  I can't actually tell you what the code actually is because your editor keeps corrupting it.  Those spurious ="true" bits of text are being added by your editor!!!  Your editor is also changing the name of my text field.  I won't bother to tell you what it should be, becuase your editor will probably just change it.)
     
    In CE version 5.3, this function worked properly, but in version 6.0, the PasteHTML command not only pastes the value of t, it pastes an additional space character, and overwrites whatever characters are just to the right of the insertion point, be they text or existing HTML tags.
     
    For instance, if I use my custom button to insert the {LASTNAME} tag at the begining of the following line:
     
    is your last name.
     
    The line becomes:
     
    {LASTNAME} s your last name.
     
    Similarly, if I have the following text:
     
    This is a line of text.
     
    This is another line text below an empty line.
     
    And I use my custom button to insert the {LASTNAME} between these two line of text, the result is:
     
    This is a line of text.
    {LASTNAME}This is another line text below an empty line.
     
    The PasteHTML() command, in other words, deletes the underlying <div> or <br /> tag that the pasted text was next to.
     
    This is totally unacceptable behavior that did not exists in version 5.3.  Is this by design (in which case I'll go back to using version 5.3), or is it a bug (in which case I'll wait for a fix)?
     
    Thanks,
     
    James
     
    BTW, thes last few lines a not supposed to be in Courier.  I can't make your editor render them in Verdana.
     
  •  04-17-2007, 2:53 PM 28508 in reply to 28499

    Re: 6.0 PasteHTML() command not working right.

    I am not sure if this is the same issue you are reporting, but I have also seen CuteSoft 6.0 add the ="true" but it is hard for me to reproduce to report the issue.  All I can say is I have seen CuteSoft put this in some of my HTML...
     
    selected="true"="true"="true"="true"="true"="true"="true"="true"="true"="true" 
     
    Jason
  •  04-17-2007, 3:12 PM 28510 in reply to 28508

    Re: 6.0 PasteHTML() command not working right.

    Looks like some kind of hiccup in the AJAX implementation.  This is but one of the problems I'm finding with version 6.0
  •  04-18-2007, 4:25 AM 28540 in reply to 28510

    Re: 6.0 PasteHTML() command not working right.

    Guys,
     
    Please download the latest build and try again.
     
     

    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