New Ctrl + v - funtionality strip Word formatting

New Ctrl + v - funtionality strip Word formatting

by Janne Mikkonen -
Number of replies: 13
I've added new function to strip Word formatting. Function is called when user press down Ctrl + v keys.

It still should be tested thoroughly before it can be added to main distribution, so it wouldn't mess up basic function key operations (ctrl + v eg).

So please try it out: http://web.jaiko.fi/janne/moodle
User: teacher
Pass: teacher

Try copy - paste from different sources (not only from Word).

- Janne -
Average of ratings: -
In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Awesome - thanks, Janne! I really needed something like that!

(Didn't work for me on Mozilla, though - which tags does it strip?)
In reply to Martin Dougiamas

Re: New Ctrl + v - funtionality strip Word formatting

by Janne Mikkonen -

Please don't thank me blush. It was allready available (spent hours to find it though).

It'll strip out font, span, div and classes and xml part that Word generates (<o:p>, <?xml: , class=MsoNormal eg).

- Janne -

In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting

by Teemu Sumi -
PDF test didn't go so well with Mozilla 1.5 and IE 5.5. All the text came but wasn't correctly formatted. You can't always win sad


Teemu
In reply to Teemu Sumi

Re: New Ctrl + v - funtionality strip Word formatting

by Janne Mikkonen -

Yes, it doesn't and it shouldn't. When you copy from PDF -files there are no similar formatting included as in Word or Excel. It's just clear text with line breaks.

- Janne -

In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting

by Teemu Sumi -
Works with Excel. With Mozilla 1.5 and IE 5.5. approve

Teemu
In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting

by Jacob Romeyn -
Make it easy to cut and paste a complete web page hosted on any server.  Great featurebig grin
In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting + new table properties!!!

by Janne Mikkonen -

I never liked the way that this editor handles tables (there aren't enough words to describe all those finnish curse words that I've used).

So I made some changes.

  • Columns have I default width value based on table width.
  • Column content is vertically aligned to top of the cell.

So please test it out in a same place as before. If It works OK, we can put it on the main distribution...

- Janne -

In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting

by Tim Allen -

I'm currently trying to use this feature, but whenever I use Ctrl-V the contents of the clipboard are pasted in!  How do I empty the clipboard (short of rebooting the computer clown)?

Was this feature put into CVS?  I type up a lot of documents in Word which I then want to paste into a html resource, so it would be so useful!  smile

Tim.

In reply to Tim Allen

Re: New Ctrl + v - funtionality strip Word formatting

by Janne Mikkonen -
CTRL + V always should paste the contents of the clipboard. This means that if that content is MS Word HTML, CTRL + V paste content of clipboard to editor and fires up the cleaning function that cleans up MS Word HTML.

If the content is already in the editor, do not use CTRL + V, use Clean Word HTML -button from menubar (next to Paste -button) or press CTRL + 0 (zero).

- Janne -




In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting

by Tim Allen -

Janne, thank you so much for your reply, that makes it a lot clearer.  approve

Just one thing - I can't find the clean Word HTML button - is that only in Mozilla (I am using IE atm)?

Tim.

In reply to Tim Allen

Re: New Ctrl + v - funtionality strip Word formatting

by Zbigniew Fiedorowicz -
In reply to Zbigniew Fiedorowicz

Re: New Ctrl + v - funtionality strip Word formatting

by Janne Mikkonen -
See above smile (thanks Zig). If you can't see that button, you're using older version.

- Janne -

In reply to Janne Mikkonen

Re: New Ctrl + v - funtionality strip Word formatting

by Tim Allen -

Oh I see, it was the cache problem again.  The editor seems to be more resistant to refreshing than other resources.  I emptied the cache (not just a force refresh) and voila the button appeared - it must have been hidden away there for some time!  clown 

Thanks a lot for your help.  smile