arkhitech / redmine_mentions

Allows users to mention team members in their notes/comments.
MIT License
98 stars 88 forks source link

No Popup in CK Editor #37

Open amenk opened 8 years ago

amenk commented 8 years ago

We are using the commercial EasyRedmine extensions and HTML which seems to be based on CKEditor as well.

When typing @ there is no popup with the user names.

Could this be fixed?

We might be able to sponsor the fixing of this issue.

amenk commented 8 years ago

This is actually almost working:

https://github.com/yuku-t/jquery-textcomplete/issues/90

https://github.com/soxhub/jquery-textcomplete/commit/89729d4a5cfc0046d5c18290c9498e2fd38799dd

amenk commented 8 years ago

I changed the invocation to this: https://github.com/arkhitech/redmine_mentions/blob/master/app/views/hooks/redmine_mentions/_edit_mentionable.html.erb#L14

But actually I called this manually because initially it did not work. I guess I would have to call it after the CKEditor initialization

But when I type now something like @fo and press Tab, I end up in @foo o. Also I get the error

Uncaught TypeError: Cannot read property 'clientTop' of undefinedCKEDITOR.tools.extend.getDocumentPosition @ ckeditor.js:104U @ ckeditor.js:975r @ ckeditor.js:977v.mouseNear @ ckeditor.js:964(anonymous function) @ ckeditor.js:981
amenk commented 8 years ago

I was able to fix the "clientTop" error by removing the .overlay() call on the CKEditor

amenk commented 8 years ago

my current version - but still problems with completion https://github.com/arkhitech/redmine_mentions/compare/master...iMi-digital:fix-37-ck-editor?expand=1

hishammalik commented 8 years ago

will try to plan development over this in 2-3 week's. Doesn't look possible to invest time at this time.

amenk commented 8 years ago

@hishammalik that sounds good. Did you have a look at my changes? The patch for redmine_mentions seems to work quite well. With the jquery.textcomplete the problem seems to be that keydowns are not properly catched. Are you planning to fix this in jquery.textcomplete?

amenk commented 8 years ago

@hishammalik Sorry to bother you. Can you give me feedback what is the plan? In case we can support you with anything ...

amenk commented 8 years ago

@hishammalik Would appreciate a short feedback, what is the plan with this issue - is it about the javascript fixing?

amenk commented 8 years ago

I will have a look at it again now ...

archonwang commented 8 years ago

O. I will tested it later. Thanks. @amenk

amenk commented 8 years ago

I tried to reproduce the issue without redmine, just the CK editor and textcomplete https://github.com/soxhub/jquery-textcomplete/commit/89729d4a5cfc0046d5c18290c9498e2fd38799dd - this actually works well .. have to dig further - might be an issue of the redmine specific config

amenk commented 8 years ago

I got it working also in redmine using the latest CK editor and the just mentioned patch. Will you merge it from @soxhub?

amenk commented 8 years ago

Current Problem: It is not working with the CKEditor "tabs" Plugin which is used in EasyRedmine - so will try another approach.