Skip to content

Commit

Permalink
Fix yuku#285: Remove dependency on Redmine / issue_notes undefined
Browse files Browse the repository at this point in the history
Some Redmine specific code slipped in which is now removed.
The CKEditor is stored in an option to be available in the ckeditor plugin.
  • Loading branch information
amenk committed Sep 17, 2016
1 parent 56cc8fc commit 9f48f12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$.extend(CKEditor.prototype, $.fn.textcomplete.ContentEditable.prototype, {
_bindEvents: function () {
var $this = this;
CKEDITOR.instances["issue_notes"].on('key', function(event) {
this.option.ckeditor_instance.on('key', function(event) {
var domEvent = event.data;
$this._onKeyup(domEvent);
if ($this.completer.dropdown.shown && $this._skipSearch(domEvent)) {
Expand Down
1 change: 1 addition & 0 deletions src/completer.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
self.$el = $(event.editor.editable().$);
if (!self.option.adapter) {
self.option.adapter = $.fn.textcomplete['CKEditor'];
self.option.ckeditor_instance = event.editor;
}
self.initialize();
});
Expand Down

0 comments on commit 9f48f12

Please sign in to comment.