Unable to paste into Rich Text Editor since upgrading to RT 4.2.4

Since upgrading to RT 4.2.4, users are unable to paste into the rich text editor. Only bothered to reproduce this with Google Chrome on a Mac, as the error indicates that the problem is browser-wide.

Steps to reproduce:

  1. Ensure your configuration has the Rich Text Editor enabled.
  2. Reply to any ticket (or compose a new ticket).
  3. Click on the text editor to give it focus.
  4. Paste, using keyboard shortcut.

What happens:
Nothing.

What is expected:
Text from the clipboard appears in the editor.

Chrome shows the following errors in the console (where https://redacted/rt is the root of my RT site):
GET https://redacted/rt/Ticket/plugins/pastefromword/filter/default.js?t=D08E 404 (Not Found) squished-884af658b44cdd5c585766ea0a0518ba.js:3325
Uncaught TypeError: undefined is not a function squished-884af658b44cdd5c585766ea0a0518ba.js:4040

The dynamic GET originates from this file (when un-squished):

/opt/rt4/share/static/RichText/ckeditor.js

CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||d+“filter/default.js”)

A hacky patch that solves the problem for me:

/opt/rt4/share/static/RichText/config.js
47a48,50

// Since ckeditor is always used from an /rt/Controller, use ‘…/’ to get back to the RT root directory.
config.pasteFromWordCleanupFile = ‘…/static/RichText/plugins/pastefromword/filter/default.js’;

Cheers,
Jan

I have seen this when users are copying text from some MS app (like
Misrosoft Outlook) on Windows OS with shortcut CTRL+C and pasting with
CTRL+V.

The clipboard contains a lot of MS formating data that RT “doesnt like”.

When they use shortcut CTRL+SHIFT+V, then plain text is pasted and it works
OK.

Of Jan KurianskiSent: Saturday, May 17, 2014 12:58 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Unable to paste into Rich Text Editor since upgrading to
RT 4.2.4

Since upgrading to RT 4.2.4, users are unable to paste into the rich text
editor. Only bothered to reproduce this with Google Chrome on a Mac, as the
error indicates that the problem is browser-wide.

Steps to reproduce:

  1. Ensure your configuration has the Rich Text Editor enabled.

  2. Reply to any ticket (or compose a new ticket).

  3. Click on the text editor to give it focus.

  4. Paste, using keyboard shortcut.

What happens:

Nothing.

What is expected:

Text from the clipboard appears in the editor.

Chrome shows the following errors in the console (where https://redacted/rt
is the root of my RT site):

GET
https://redacted/rt/Ticket/plugins/pastefromword/filter/default.js?t=D08E
404 (Not Found) squished-884af658b44cdd5c585766ea0a0518ba.js:3325

Uncaught TypeError: undefined is not a function
squished-884af658b44cdd5c585766ea0a0518ba.js:4040

The dynamic GET originates from this file (when un-squished):

/opt/rt4/share/static/RichText/ckeditor.js

CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||d+“filter/default.js”)

A hacky patch that solves the problem for me:

/opt/rt4/share/static/RichText/config.js

47a48,50

// Since ckeditor is always used from an /rt/Controller, use ‘…/’ to get
back to the RT root directory.

config.pasteFromWordCleanupFile =
‘…/static/RichText/plugins/pastefromword/filter/default.js’;

Cheers,

Jan

Since upgrading to RT 4.2.4, users are unable to paste into the rich text editor. Only
bothered to reproduce this with Google Chrome on a Mac, as the error indicates that the
problem is browser-wide.

Just tested with Google Chrome on a Mac 34.0.1847.137 and copy/paste
html or plain text into the rich text editor on new ticket creation
works fine.

I assume you’re actually pasting some rich text from a word document,
which is important to the bug report, and not just random plain text.

-kevin