Ticket #5566 (closed Bug: fixed)

Opened 4 years ago

Last modified 7 months ago

Smart tags not dealt with by pastefromword

Reported by: navnorth Owned by:
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version:
Keywords: Cc:

Description

Smart tags are not dealt with in any way by the pastefromword plugin.

One of our users attempted to paste content from a Word Document into CKEditor. The content contained the following line.

<st1:stockticker w:st="on"><u>JOB</u></st1:stockticker><u>TITLE</u>

In this case, the smart tag was inserted incorrectly in the Word Document, but that is true for many documents created with automatic smart tagging enabled.

Smart tags should be removed in the same way that other Word-specific tags are removed, while preserving any content between the tags. Leaving smart tags intact causes display issues if the content from a wysiwyg is later displayed as html.

For our system, I added the following lines to the default.js for the pastefromword plugin.

h=h.replace(/<st1[^>]*>/g,'');
h=h.replace(/<\/st1[^>]*>/g,'');

This removes all <st1> tags, while leaving contained content alone.

Change History

comment:1 Changed 2 years ago by j.swiderski

  • Status changed from new to closed
  • Resolution set to fixed

It seems that in latest CKEditor 3.6.3 smart tags are stripped.

NOTE: Seems that smart tags were dropped and are no longer available in MS 2010.

comment:2 Changed 7 months ago by fredck

  • Component changed from Core : Pasting to Plugin : Paste from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy