Details
-
Bug
-
Resolution: Invalid
-
Critical
-
None
-
1.39
-
None
-
None
-
Unknown
-
Description
When configuring a plugin in CKEditor Administration section, Uncaught Error: [CKEDITOR.resourceManager.add] The resource name "keystrokes" is already registered may occur and break other features, like annotations, comments.
It was possible in version 1.39 to add custom keystrokes from CKEditor Administration section, to remove format from text, when in WYSIWYG editor, with the following example:
CKEDITOR.plugins.add( 'keystrokes', { init: function( editor ) { editor.setKeystroke( CKEDITOR.CTRL + 71 , 'removeFormat' ); // CTRL G } }); config.extraPlugins = 'keystrokes';
Since version 1.40 this causes a JS error, when a WYSIWYG editor is used (content, annotations, comment):
Uncaught Error: [CKEDITOR.resourceManager.add] The resource name "keystrokes" is already registered
In order to reproduce the upgrade from CKEditor from 1.39 to 1.40, we can use XWiki 10.10.
However, to see this error affecting other features, we can look at XWiki 13.10.7, adding the above configuration, then adding a comment in a page. First comment is successfully added, but a second comment will fail to load the editor and the JS error will be present in the console. Also, see: pluginAlreadyRegistered.png