Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.7.11, 2.8.9, 2.9.3, 3.0, 3.5.9, 3.6.7, 3.7.3, 3.8, 3.9
-
None
-
None
-
MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
Description
Summary
When I paste information copied from Microsoft Word, through the Windows clipboard, into an Atto editor, there is so much unwanted styling and unwanted code. This can create accessibility issues as the content, when viewed in context can be so different than what is seen in the Atto editor.
Full Steps
1) Open the attached document in Microsoft Word. It's not very long document, only a few lines including a heading and a few unordered bullets.
2) Press ctrl-a to select all
3) Press ctrl-c to copy onto the Windows clipboard.
4) In a course, add a new Page resource to one of the sections and set the page title to Paste Test.
5) Press ctrl-v to paste the content of your Windows clipboard into the Atto editor for the Content section of the page.
6) View the HTML.
What I expected
As there is no special formatting applied to the content in Word but just some styles including Heading 1 for the first line and unordered bullets for the rest, that is all the markup I expected to see in the HTML code - some h1, ul, li and maybe a paragraph set of tags at the end.
What actually happens
The fact is that you will not find any H1 tags, or any UL or LI tags. What you do find is way too much formatting junk that ends up in there. If I were to save the content as is, the content would not take on the look and feel of the site.
Workaround
When copying and pasting content from Word, I have to make sure to switch the default editor in my profile settings to TinyMCE and use the tools that I to work. However, with the increasing popularity of Atto as the editor of choice for Moodle, I would much prefer that this work in a useful manor.
Test Environment
Browser: Chrome version "46.0.2490.86 m" on Windows 7. Still happening in Chrome 79 on Windows 10.