TrentMcMahon
Community Member

Copy and Pasting from Word to RCE -- 600 Line Code and Other Formatting Issues

This morning, my entire team noticed that pasting anything from a Word doc -- even a newly opened one -- is causing a few odd things to happen to the code in the RCE and the look of the object itself. 

  1. A 600-700 line of code is appearing in the HTML editor (attached as "CodeSnippetCanvas")
  2. Styles, formatting, and other odd span tags are appearing when content is pasted from Word, even when this styling is applied to the heading style itself and not manually added to the Word doc. This did not used to happen. (attached as "UglyFontCanvas" and "UglyFontCanvasCode")

This has some major implications for not only uniformity, but more severely, accessibility. Our team was very appreciative that Canvas made it somewhat difficult to paste in unnecessary style and keep things in a uniform Canvas style, since it left the code relatively clean. I hope this is something they fix; I saw that they rolled out RCE updates on 12/7... I know the workarounds like the RCE's clear formatting button and pasting as plain text, but those seem to be bandages for a tool that worked mostly fine up until yesterday.

Anyone else experiencing this?

Labels (1)
3 Replies
greydon
Instructure
Instructure

Hello  @TrentMcMahon 

This is an issue right now that Canvas is trying to fix. There are two ways to fix it while they work on the issue - you can either type the question out manually or pasting while matching style: CMND SHFT V (on Mac) or CTRL SHFT V (on Windows) Hopefully this helps and the issue should be resolved shortly.  

AndrewTaylor
New Member

We are noticing this as well. @greydon , do you have a link to a Known Issues page or something similar? I looked at the existing Known Issues but didn't see this mentioned.

Additionally, we're also seeing that when users upload documents with ampersands in the filename, the ampersands are present but so is the 'amp;' code element. So a document titled 'D&D' uploads as 'D&D'.

0 Kudos
Chris_Hofer
Community Coach
Community Coach

@TrentMcMahon ...

I have never been a big fan of copying/pasting text from MS Word into the RCE (Rich Content Editor) of Canvas ... mainly because it tends to bring in a lot of junk (or what I sometimes call "rogue") code.  I know there are tools out there on the Internet that can help clean up your code so that it looks similar (if not identical) to what you had intended in the Word document.  Doing a Google search for "Word to HTML" brings up several results...such as: Convert Word and PDF files to HTML | Free online HTML editor (wordtohtml.net).  A while back, I wrote a blog post here in the Community about how to clean up HTML code (not necessarily from a Word document):

So...this might give you some helpful suggestions, too.

Anyway...I wanted to provide my $0.02.  Hope it helps a bit.

0 Kudos