Opened 13 years ago

Last modified 7 years ago

#8009 confirmed Bug

Paste From Word creates <a> tags with no attributes wherever contents are "highlighted" by Comments

Reported by: Josh Owned by:
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version: 3.0
Keywords: Cc: torque18@…


Please forgive the poor summary of this ticket, as it is hard to summarize.

When pasting content from Word, any Microsoft Word Comments are also pasted (whether or not "View Markup" is currently selected). This creates anchor links and footnotes in the content (which may or may not be desirable behavior) but also creates "empty"


tags around the first paragraph associated with the comment. The anchor tags are empty in the sense that they have no attributes such as "href" or "name".

I don't know if this is technically invalid html but it is certainly undesired behavior. Since our site stylesheets don't make these "a" elements stand out by default, the extra tags just remain undetected in the source code once the rest of the comment markup is deleted from the editor.

I attached a Word doc with contents that can be pasted into the editor to demonstrate.

I would also like to see at least a config option to strip out the comments completely, but I guess I can create a feature request ticket depending on how much of this behavior is considered a bug.

System: Windows XP, IE 8, Microsoft Word 2003

Attachments (1)

CKEditor-comment-test-2011-06-08.doc (31.5 KB) - added by Josh 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by Josh

comment:1 Changed 13 years ago by Josh

Pasting the attached word doc generates this source:

	Test paragraph 1.</p>
	<a>Test paragraph 2.</a></p>
	Test paragraph 3. <a href="#_msocom_1" id="_anchor_1" name="_msoanchor_1" uage="JavaScript">[jht1]</a></p>
	Test paragraph 4.</p>
	<hr align="left" size="1" width="33%" />
		<div id="_com_1" uage="JavaScript">
				&nbsp;<a href="#_msoanchor_1">[jht1]</a>Test comment</p>

The offending tags can be seen on this line:

	<a>Test paragraph 2.</a></p>

comment:2 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.1 (SVN - trunk)3.0

Reproducible in all browsers from CKEditor 3.0

comment:3 Changed 10 years ago by Frederico Caldeira Knabben

Component: Core : PastingPlugin : Paste from Word

comment:4 Changed 7 years ago by Tade0

Milestone: CKEditor 4.6.0

comment:5 Changed 7 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.0

We're unable to put any more PFW related tickets in 4.6.0. We'll revisit it later.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy