loopindex / ckeditor-track-changes

Track changes plugin for CKEditor, based on ICE (track changes for TinyMCE).
www.loopindex.com
Other
51 stars 55 forks source link

Special characters not inserted in CKEditor on Drupal when change tracking is on #112

Closed milossramek closed 7 years ago

milossramek commented 7 years ago

Hi, Special characters are not inserted in CKEditor with LITE in Drupal when change tracking is on. Tested with Firefox and Chrome on Ubuntu Linux (both client and server). If the module https://www.drupal.org/project/ckeditor_lite is also installed, the LITE buttons are show, but the behaviour is the same. In this case, if tracking is switched off, the characters are inserted correctly.

If run directly from ckeditor/samples the characters are inserted correctly (both from the file system and using the http://ipaddress/sites/all/modules/ckeditor/ckeditor/samples/)

A different jquery.js is used in these two cases (as shown by the Developer tools debugger (in firefox).) Drupal: resource://youtuberightclick/data/scripts/jquery.js http://192.168.43.95/misc/jquery.js?v=1.4.4 (part of drupal distribution)

Direct call: http://192.168.43.95/sites/all/modules/ckeditor/ckeditor/plugins/lite/js/jquery.min.js

So, maybe that the problem resides in these different jquerry versions. Can I force CKeditor to use its own jquery.min.js?

Thank you in advance for your help Milos

To reproduce:

  1. Download CKeditor with LITE from the CKeditor page (the most recent 4.5.11 was tested)
  2. Install standard Drupal| and its module CKeditor: drush dl drupal --drupal-project-rename=example cd example drush site-install standard --db-url='mysql://[db_user]:[db_pass]@localhost/[db_name]' --site-name=Example drush en ckeditor -y
  3. Unzip the downloaded ckeditor to sites/all/modules/ckeditor 4. Tell Drupal to use the installed CKeditor by setting in admin/config/content/ckeditor/editg: Path to CKEditor: %m/ckeditor Path to the CKEditor plugins directory: %m/ckeditor/plugins

From this on the CKEditor widget does not show the LITE buttons, but change tracking is active (characters inserted from keyboard have green background).

  1. Press the Insert Special Character (Ω) button and insert a character - it does not appear in the text area. An error message appears in the console of the Developer tools (in firefox). TypeError: g.getAttribute is not a function jquery.js:95:177 with the following data (stack?): k.selectors.filter.ATTR() jquery.js:95 k.filter() jquery.js:84 k() jquery.js:81 k() jquery.js:102 k.matchesSelector() jquery.js:102 .filter() jquery.js:110 .is() jquery.js:106 G.prototype._onPaste/c<() ckeditor.js:1129 filter() self-hosted G.prototype._onPaste() ckeditor.js:1128 bound () self-hosted m() ckeditor.js:10 CKEDITOR.event.prototype</<.fire</<() ckeditor.js:12 CKEDITOR.editor.prototype.fire() ckeditor.js:13 .insertText() ckeditor.js:257 m() specialchar.js:5 CKEDITOR.tools.addFunction/<() ckeditor.js:31 CKEDITOR.tools.callFunction() ckeditor.js:31 onclick() article:1
milossramek commented 7 years ago

My hypothesis turned out to be correct: Drupal is by default using jquery 1.4.4 and ckeditor 1.9.1. If replaced misc/jquery.js in the drupal home by that from ckeditor, special characters are inserted correctly. m