Forum Moderators: open

Message Too Old, No Replies

Preventing Word formatting when pasting

Can this be done?

         

Jimmy Turnip

1:02 pm on Sep 20, 2004 (gmt 0)

10+ Year Member



I have a content manager that uses javascript designmode to edit the pages, but I only want the users to be able to use the buttons and options that i've created.

They are using Word to write the content, so when they copy and paste the text into the application it is retaining all the Word formatting.

Is there any way of preventing this without telling them to copy into notepad first and then paste from there?

Thanks.

Sanenet

1:11 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Had the same problem, but never found a solution that was easier than copying via Notepad. :(

Easy_Coder

3:54 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try PureText at stevemiller.net. It will let you paste from Word w/o the formatting. Once you install PureText click Windows Button + v and that will paste unformatted text.

mattglet

5:40 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only way to do it, is to use notepad or a 3rd party component.

The problem is being caused because you're copying from a rich-text editor, to a rich-text editor. All the formatting options will stay. You need to paste to a plain-text editor to nullify the rich-text formatting.

coopster

5:52 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The open source project htmlarea has an MS Word stripping function.

[sourceforge.net...]

Jimmy Turnip

9:35 am on Sep 21, 2004 (gmt 0)

10+ Year Member



Cheers for that coopster, that's a really excellent bit of kit.

That PureText thing is pretty nifty, but I should be able to do it using HTMLArea. In fact, I may just use the HTMLArea instead it's that good!