ivirabyan / jquery-mentions

Adds mentioning support to your text fields.
http://ivirabyan.github.io/jquery-mentions/
MIT License
114 stars 49 forks source link

WYSIHTML5 doesn't work #56

Closed cristhian-net closed 1 year ago

cristhian-net commented 8 years ago

So, I've been applying this nice plugin into all my textareas for mentions. I do have 2 textareas with the plugin bootstrap-wysihtml5 , and can't get it to work ! It does create an < iframe > with < body content-editable="true" > , when type any character an error is threw (Cannot read property "textContent" of null). ¿ How may I solve this ?. Thanks for this plugin, and for the answer too !

PS: I'm Argentinian. So native Spanish speaker here !

ivirabyan commented 8 years ago

Looks like a bug in autocomplete widget for contenteditable. I need to investigate more into this

cristhian-net commented 8 years ago

Thanks !

nttuyen commented 7 years ago

Any news on this issue? I meet the same problem when try integrate this with ckeditor.

ivirabyan commented 7 years ago

No news so far, I'll try to fix this issue this or maybe next weekend

nttuyen commented 7 years ago

:+1: Thank you so much @ivirabyan, I will try to take a look on my side also

daxhns commented 7 years ago

@nttuyen, any luck on integrating mentions with ckeditor? I also plan to do it..

nttuyen commented 7 years ago

@daxhns: not yet, I'm still stuck on this

ivirabyan commented 7 years ago

Still hadn't time to investigate, hope next weekend. Any help would be appreciated

ivirabyan commented 7 years ago

I figured out the source of problem - many wysiwyg editors put contenteditable element inside of an iframe. Unfortunately this plugin was never supposed to work inside of an iframes, which implies a number of issues. I managed to solve this particular error, but there are others, like correctly positioning dropdown menu. You can look at the work in progress in this branch https://github.com/ivirabyan/jquery-mentions/tree/wysiwyg-iframe-support I only have little time at weekends, so it may take some time to solve all issues.

We used it with plugin Redactor.js, which doesn't embed contenteditable into iframe, so we haven't faced such issue. I've seen that some editors (tinymce, ckeditor for example) support inline mode, which works without creating iframe. With this enabled it should work as expected. That's all I can suggest by now.