A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2008 yearHow do I remove Word markup crap when inserting to a form? - page 1
User InfoPosts
How do I remove Word markup crap when inserting to a form?#1
I'm building a CMS in PHP and one dread I have is that the users will have to fill the data in from existing Word (and Excel, but nevermind that) documents. Now, I've seen what happens when they carelessly copy and paste from Word to a textarea: the database got filled with crap markup.

Now, I could certainly strip all markup myself, but I'd have to start learning about it first. So I ask you: have you tested some functionality - plugins of the usual suspects (tinyMCE, FCKeditor, etc) that helps here? Bonus for the least intrusive solution.

posted date: 2008-12-24 03:35:00


Re: How do I remove Word markup crap when inserting to a form?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2008-12-24 03:35:01


Re: How do I remove Word markup crap when inserting to a form?#3
Ok, I found a plugin for TinyMCE that apparently does what I wanted. Still, this asks for the users to press a button to paste, which is a bit less than ideal. Anything better?

posted date: 2008-12-24 04:00:00


Re: How do I remove Word markup crap when inserting to a form?#4
I have found FCKEditor to handle text yanked and thrown at it from Word documents, much better than tinyMCE.

posted date: 2008-12-24 04:06:00


Re: How do I remove Word markup crap when inserting to a form?#5
The existing website I was talking about in the question already uses FCK, although not the latest version. Is it a recent improvement?

posted date: 2008-12-24 04:09:00


Re: How do I remove Word markup crap when inserting to a form?#6
Sadly most of the HTML editor controls I've used either:Have a button to strip out various elements of mark up (word, html, script, etc)Strip out all markup on paste via JavaScript.If you leave it to a button, then generally the non-technical users will forget to press it because they don't (some would say "shouldn't have to") care about it :(With a bit of playing around with Regular Expressions (now you have another problem ;)) you could do something similar to 2 but just for word xml.

posted date: 2008-12-24 04:10:00


Re: How do I remove Word markup crap when inserting to a form?#7
ASP.NET? Telerik's RadEditor has worked very well for me

posted date: 2008-12-24 04:13:00


Re: How do I remove Word markup crap when inserting to a form?#8
Sorry, PHP (retagged now), but thanks.

posted date: 2008-12-24 04:14:00


Re: How do I remove Word markup crap when inserting to a form?#9
@Moranar: I can't say. I am using version 2.6.3. It is just that when using tinyMCE, I found that it made it difficult to properly edit text copied from a Word document. FCKEditor, in contrast, did not have any of those issues.

posted date: 2008-12-24 05:11:00


Re: How do I remove Word markup crap when inserting to a form?#10
The paste from Word feature has been in for awhile. Not sure how long. It also auto-picks up the need to do Word pasting when a user uses the browser Edit->Paste or Ctrl+V.

posted date: 2009-01-27 18:02:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.