YUI Editor: How to paste as plain text?

1.7k Views Asked by At

I implemented the Yahoo Rich Text Editor (YUI Editor) in a Rails application using the YUI_Editor Plugin.

If I copy/paste text out of a PDF into a YUI-Editor-enhanced-TextArea (YEETA :)) it does not only copy the text but also the formatting of it.

How do I configure the YUI Editor to remove all formatting of text pasted into the YEETA before inserting it?

I'm intrested in your answer even if you're not working with Rails and/or using the YUI_Editor plugin. Give me a hint and I'll figure out how to solve this with my setup.

Thanks a lot for your help!

2

There are 2 best solutions below

0
On BEST ANSWER

As far as I know there is no such function in the YUI editor. Finally I parsed the editor content on submit as described on this question.

1
On

I've written an extension to the YUI editor to handle this, you can download it here:

http://antscode.blogspot.com/2009/05/strip-formatting-on-paste-using-yui.html