Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center
in Search

removing all html on paste

Last post 06-25-2006, 9:32 AM by Adam. 21 replies.
Page 1 of 2 (22 items)   1 2 Next >
Sort Posts: Previous Next
  •  05-04-2006, 2:12 AM 18800

    removing all html on paste

    Hi all.

    I wish to paste content as pure text, but nothing seems to work.

    editor.AllowPasteHtml = false
    editor.EditorOnPaste = "PasteText"

    Neither of these work fully. There is still < P > tags, link tags, etc...

    The only way I can completely remove HTML from the content is to use the code-cleaner.
    However, I need this to be automated when the text is first pasted.

    How can this be fixed? Anyone have any success in getting it to work properly?

    Thanks.
  •  05-04-2006, 2:19 AM 18801 in reply to 18800

    Re: removing all html on paste

    ReqMan,
     
    This feature is by design. We can remove all the HTML code when pasting. But that doesn't make sense to us.  <P> and <br> tags are necessary to keep the existing format.
     
     
     
     

    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

  •  05-04-2006, 2:25 AM 18802 in reply to 18801

    Re: removing all html on paste

    then its not a "pastetext" function at all.

    my users need to paste clean text (no html), which is what "pastetext" is supposed to do (there is already a pastCleanHtml).

    so now they must use the code-cleaner which is extra steps, and not obvious to new users.

    so shouldnt the "pastetext" do what it's definition dictates and what the code-cleaner already does?
    afterall, paste-text means pasting "text", not "html" or "part-html".

    additionally, it still allows other html elements like hyperlinks, which is a HUGE mistake considering this is supposed to be "plaintext", not html.



  •  05-04-2006, 2:28 AM 18803 in reply to 18802

    Re: removing all html on paste

    PasteText - "When you paste text into the editor, all HTML formatting is stripped. This option is ideal for content management systems where you want absolute control over the formatting"

    Straight from your own documentation.

    Which of course means the paste-text function is broken. Can we get it fixed please?
  •  05-05-2006, 4:06 PM 18880 in reply to 18803

    Re: removing all html on paste

    Regman,
     
    For example, you select the following content:
     
    When your algorithmic and programming skills have reached a level which you cannot improve any further, refining your team strategy will give you that extra edge you need to reach the top. We practiced programming contests with different team members and strategies for many years, and saw a lot of other teams do so too.
    From this we developed a theory about how an optimal team should behave during a contest. However, a refined strategy is not a must: The World Champions of 1995, Freiburg University, were a rookie team, and the winners of the 1994 Northwestern European Contest, Warsaw University, met only two weeks before that contest.

    If you set the editor.EditorOnPaste = "PasteText", you can get the following HTML after pasting:
     
    When your algorithmic and programming skills have reached a level which you cannot improve any further, refining your team strategy will give you that extra edge you need to reach the top. We practiced programming contests with different team members and strategies for many years, and saw a lot of other teams do so too.
     

    From this we developed a theory about how an optimal team should behave during a contest. However, a refined strategy is not a must: The World Champions of 1995, Freiburg University, were a rookie team, and the winners of the 1994 Northwestern European Contest, Warsaw University, met only two weeks before that contest.


    It doesn't make sense to us to get the following result:
     
    When your algorithmic and programming skills have reached a level which you cannot improve any further, refining your team strategy will give you that extra edge you need to reach the top. We practiced programming contests with different team members and strategies for many years, and saw a lot of other teams do so too.    From this we developed a theory about how an optimal team should behave during a contest. However, a refined strategy is not a must: The World Champions of 1995, Freiburg University, were a rookie team, and the winners of the 1994 Northwestern European Contest, Warsaw University, met only two weeks before that contest.   
     

    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

  •  05-05-2006, 4:07 PM 18881 in reply to 18803

    Re: removing all html on paste

    Regman,
     
    For example, you select the following content:
     
    When your algorithmic and programming skills have reached a level which you cannot improve any further, refining your team strategy will give you that extra edge you need to reach the top. We practiced programming contests with different team members and strategies for many years, and saw a lot of other teams do so too.
    From this we developed a theory about how an optimal team should behave during a contest. However, a refined strategy is not a must: The World Champions of 1995, Freiburg University, were a rookie team, and the winners of the 1994 Northwestern European Contest, Warsaw University, met only two weeks before that contest.

    If you set the editor.EditorOnPaste = "PasteText", you can get the following HTML after pasting:
     
    When your algorithmic and programming skills have reached a level which you cannot improve any further, refining your team strategy will give you that extra edge you need to reach the top. We practiced programming contests with different team members and strategies for many years, and saw a lot of other teams do so too.
     

     From this we developed a theory about how an optimal team should behave during a contest. However, a refined strategy is not a must: The World Champions of 1995, Freiburg University, were a rookie team, and the winners of the 1994 Northwestern European Contest, Warsaw University, met only two weeks before that contest.
     


    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

  •  05-06-2006, 6:17 PM 18897 in reply to 18801

    Re: removing all html on paste

    Adam,
     
    I understand your reasoning, but there are cases when this editor may be used for something other than html editing, maybe like XML or plain text. I would suggest that you give an option to allow this.
     
    RC
  •  05-06-2006, 11:10 PM 18899 in reply to 18897

    Re: removing all html on paste

    Guys,
     
    I see. I will post a quick solution to this issue.
     
    Thanks for the suggestions.
     
     

    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

  •  05-07-2006, 12:05 AM 18901 in reply to 18899

    Re: removing all html on paste

    Regman and rcroeder,
     
    Solution is here.
     
    Member Name
    Description
    Default
    When you paste text into the editor it is not processed.
    Disabled
    Paste function is disabed.
    PasteCleanHTML
    When you pasting the html code into the editor, the empty tags, redundant nested tags and messy or unreadable HTML code are automatically cleaned up.
    PasteWord
    When you pasting the content from Word into the editor, the non-required code that usually comes with pasting from Word are automatically cleaned up.
    PasteText
    When you paste text into the editor, all HTML formatting is stripped except for paragraph marks. This option is ideal for content management systems where you want to import text from other word processors and strip off any strange formatting commands they included.
    PastePureText
    When you paste text into the editor, all HTML formatting is stripped. This option is ideal for content management systems where you want absolute control over the formatting.
    ConfirmWord
    When you pasting the content from Word into the editor, will prompt users with a popup prompt to clean the non-required code.

    Demo:
     
    Handle pasted text
     
     
     

    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

  •  05-15-2006, 6:07 AM 19143 in reply to 18901

    Re: removing all html on paste

    Sounds perfect Adam, thanks.

    How can I get this update? Do I have to download the whole editor again and copy over all my files?

    Cheers


  •  05-15-2006, 6:14 AM 19144 in reply to 19143

    Re: removing all html on paste

    ReqMan,
     
    The download file is not updated yet. We will release a minor version within this week after we put other fixes and features together.
     
     

    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

  •  05-15-2006, 8:22 AM 19145 in reply to 19144

    Re: removing all html on paste

    Ahh ok, I eagerly await this change.

    Will there be any notification of said update? How will we know when it is ready?

  •  05-17-2006, 11:13 PM 19261 in reply to 19145

    Re: removing all html on paste

    Adam, I had a think about this issue and worked out the perfect solution for any permutation.

    What if instead of the static options you are creating now, you made an option to use the CodeCleaner options?

    eg,  editor.onpaste = "cleanWord,cleanFont,cleanSpan"


    The Code-Cleaner functionality is already there and it works perfectly. All it needs is the ability to automate those options when pasting. And because the customer can choose which of those options to use when pasting, there are far more combinations available than the few static options we have now.

    It would certainly solve all the issues I am currently having, including issues where I want to remove Word markup as well as Font tags, which I currently cannot do when pasting.

    It also means less work for you guys as the CodeCleaner already works, and any time you add to the Code-Cleaner, you automatically add to the .onpaste function!

    What do you think? This would be HUGE!!!

  •  05-31-2006, 7:01 AM 19655 in reply to 19261

    Re: removing all html on paste

    Adam?

    No response to this suggestion? Still no solution to my problem...

  •  06-04-2006, 9:45 PM 19789 in reply to 19655

    Re: removing all html on paste

    Hello?

    Paying customer requesting support here...

  •  06-04-2006, 10:15 PM 19791 in reply to 19789

    Re: removing all html on paste

    lol
     
    RC
  •  06-05-2006, 8:01 AM 19795 in reply to 19789

    Re: removing all html on paste

    Version 5.2 is out.
     
    This issue is resolved in the version 5.2.
     
    Demo:
     
    Handle pasted text
     
     
    Use CuteEditor as an image selector
     
     
    Output well-formed HTML and XHTML
     
     
    Document:
     
     
    Editor.EditorOnPaste Property
     
     

    Member Name Description
    Default When you paste text into the editor it is not processed.
    Disabled Paste function is disabed.
    PasteCleanHTML When you pasting the html code into the editor, the empty tags, redundant nested tags and messy or unreadable HTML code are automatically cleaned up.
    PasteWord When you pasting the content from Word into the editor, the non-required code that usually comes with pasting from Word are automatically cleaned up.
    PasteText When you paste text into the editor, all HTML formatting is stripped except for paragraph marks. This option is ideal for content management systems where you want to import text from other word processors and strip off any strange formatting commands they included.
    PastePureText When you paste text into the editor, all HTML formatting is stripped. This option is ideal for content management systems where you want absolute control over the formatting.
    ConfirmWord When you pasting the content from Word into the editor, will prompt users with a popup prompt to clean the non-required code.
    RemoveCss When you pasting the html code into the editor, the inline styles and CSS class tags are automatically cleaned up.
    RmoveFont When you pasting the html code into the editor, the font tags are automatically cleaned up.
    RemoveSpan When you pasting the html code into the editor, the span tags are automatically cleaned up.

     

     
     

    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

  •  06-06-2006, 12:34 AM 19828 in reply to 19795

    Re: removing all html on paste

    Excellent! Thanks Adam.

    The BIG question is, does the .onpaste support Multiple options??

    Obviously having just RemoveSpan on its own is useless for a CMS if you cant include RemoveFont as well.

    So can I use something like...

    editor.onpaste="PasteWord,RemoveFont,RemoveSpan"

    That would solve my problem perfectly.



  •  06-06-2006, 9:58 PM 19866 in reply to 19828

    Re: removing all html on paste

    Adam?
  •  06-09-2006, 9:39 AM 19963 in reply to 19866

    Re: removing all html on paste

    Hello?

    Still waiting to find out if this problem has been fixed.


Page 1 of 2 (22 items)   1 2 Next >
View as RSS news feed in XML
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.