Editor stripping style on UNDO

Last post 11-11-2005, 7:09 PM by Accutitle. 4 replies.
Sort Posts: Previous Next
  •  11-10-2005, 1:39 AM 12462

    Editor stripping style on UNDO

    Finding a strange issue where when putting style tags in the actual document. For instance carrying over the style tags from Microsoft word when exporting to HTML. When loaded in the editor it looks rather well except for whitespace CHR(160), while this isn't that much of an issue and can be corrected, what I am finding is that if I apply formatting or simply type in the editor and then click undo it screws up the whole document and it loses all formatting. I check the HTML and it stripped the style tag right out.
     
    Now if I take this same doc and paste it into your demo with all configuration it does not do this. I am not doing anything other than loadhtml() so what do you think may be causing this and what can I do to stop it? Is this a strip script function firing?
     
    Thanks in advance...
     
  •  11-10-2005, 8:42 PM 12499 in reply to 12462

    Re: Editor stripping style on UNDO

    Accutitle,

    You have to put the style tags into the <head> ... </head> section. Otherwise the IE will automatically remove it.

    We will find a solution in the next version to protect the <style>... </style> tags.



     

    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-10-2005, 11:15 PM 12504 in reply to 12499

    Re: Editor stripping style on UNDO

    Thank you for the quick response!
     
    I tried to put in the head tags and same thing, when I type anywhere and hit undo it removes the head and the style tags. I have added the control to my project and haven't changed any settings. When I view code in IE on the intial load I see the style tag and head tag. When I click the HTML view tab within the control I do not see these tags, when I add them in there manually it still removes the style tag and head. What is the issue and what is the difference from the way it behaves when loadhtml is called and working with a pasted doc? Wait you know I just answered that question, when I paste it in it adds the div tage around the whole doc? Do I have to do this upon load? Is there another way?
     
    Thanks in advance...
  •  11-10-2005, 11:54 PM 12510 in reply to 12504

    Re: Editor stripping style on UNDO

    Even wrapping it in the div tag it constantly removes the head tag and when clicking and typing then clicking undo this happens still. This does not happen on postback but it does when clicking UNDO. Some things I have found:
     
     
    When loading a doc from a string and passing it to the cute editor with the likes of editor1.text = mystring. This loads fine , loads the style tags and displays perfectly in IE. Now when I click to HTML view I see my head tag, my style tag it is perfect. Now I go back to the normal view, now I go back to html view the head tag is gone but my style tag remains. Now I go back to normal and click around type some text, now click undo, wham all formatting gets messed up and I check html view and my style tag is gone.
     
    Now when I post it back and send the text to a string just after adding some text only without clicking UNDO it strips out the head but the style tag remains.

    Hope that made sense, what can I do here?


    Thanks in advance...
  •  11-11-2005, 7:09 PM 12583 in reply to 12510

    Re: Editor stripping style on UNDO

    Any idea what is going on?
View as RSS news feed in XML