|
removing all html on paste
Last post 06-25-2006, 9:32 AM by Adam. 21 replies.
-
05-04-2006, 2:12 AM |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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 |
-
05-04-2006, 2:25 AM |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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 |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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 |
-
Adam
-
-
-
Joined on 09-23-2003
-
Aurora, ON
-
Posts 18,678
-
-
|
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 |
-
Adam
-
-
-
Joined on 09-23-2003
-
Aurora, ON
-
Posts 18,678
-
-
|
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 |
-
rcroeder
-
-
-
Joined on 06-21-2004
-
Fremont, CA
-
Posts 149
-
-
|
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 |
-
05-07-2006, 12:05 AM |
-
Adam
-
-
-
Joined on 09-23-2003
-
Aurora, ON
-
Posts 18,678
-
-
|
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 |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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 |
-
05-15-2006, 8:22 AM |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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 |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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 |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
Re: removing all html on paste
Adam?
No response to this suggestion? Still no solution to my problem...
|
|
-
06-04-2006, 9:45 PM |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
Re: removing all html on paste
Hello?
Paying customer requesting support here...
|
|
-
06-04-2006, 10:15 PM |
-
06-05-2006, 8:01 AM |
-
Adam
-
-
-
Joined on 09-23-2003
-
Aurora, ON
-
Posts 18,678
-
-
|
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 |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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 |
-
06-09-2006, 9:39 AM |
-
ReqMan
-
-
-
Joined on 11-22-2004
-
-
Posts 50
-
-
|
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
|
|
|