Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with ckeditor & tinymce, also documentation. #132

Closed
heylookalive opened this issue Feb 2, 2014 · 10 comments
Closed

Issues with ckeditor & tinymce, also documentation. #132

heylookalive opened this issue Feb 2, 2014 · 10 comments

Comments

@heylookalive
Copy link

Hi, Is it possible for you to document any integration with CKeditor or TinyMCE beyond contenteditable? It'd be a great help to me and I'm sure others.

This project along with Caret is awesome, thank you for your hard work! I'm currently making a Drupal module to implement it :)

@ichord
Copy link
Owner

ichord commented Feb 3, 2014

here we go!
https://github.com/ichord/At.js/wiki/usage-with-CKEditor

but it seems that there is a compatibility problem while insert item....

ichord added a commit that referenced this issue Feb 3, 2014
lose `range` while press `ENTER`.
maybe ckeditor had hack the enter event.
just `mark the range` before enter.
@ichord
Copy link
Owner

ichord commented Feb 3, 2014

well, fixed that compatibility problem. not release yet.

@heylookalive
Copy link
Author

Thanks for the quick reply, I came to something similar, also an example for TinyMCE (specific to my work, but should be a pointer for others):

tinyMCE.onAddEditor.add(function(mgr, ed) {
        var editor = $('#' + ed.editorId + '.atjs');
        if (editor.length == 1) {
          ed.onInit.add(function(ed, l) {
            $(ed.contentDocument.activeElement).atwho({settings go here});
          });
        }
      });

@heylookalive
Copy link
Author

Also yep can confirm the following issues:

ckeditor:
When inserting it fails to replace the search string e.g. "@A" with the selected result "@alli ", instead it adds to the content with a newline, so would end up:
"@A
@alli "

tinymce:
When selecting a result it successfully replaces the search string with the result but inserts a newline, attempts to go back on to the line with the newly inserted result causes weirdness, doesn't let you add text.

Once again thanks for your work!

@ichord
Copy link
Owner

ichord commented Feb 3, 2014

cool. you can create a wiki page. ;)

@ichord
Copy link
Owner

ichord commented Feb 3, 2014

i think i just fix those issues. have a try with master code.

@heylookalive
Copy link
Author

Checking with master, no longer having that ckeditor issue, excellent!

A further note for TinyMCE, after inserting and it behaving odd atjs ceases to work, deleting all content within the editor then trying again however means it works again.

@heylookalive
Copy link
Author

By the way are you on twitter? Would be good to hear about future developments :)

@ichord
Copy link
Owner

ichord commented Feb 4, 2014

@heylookalive my twitter name is _ichord , but not tweet often.

@ichord
Copy link
Owner

ichord commented Feb 4, 2014

example for tinymce 4:

    tinymce.init({
      selector: "#mce",
      init_instance_callback: function(editor) {
        $(editor.contentDocument.activeElement).atwho(at_config);
      }
    });

@heylookalive ckeditor, tinymce will insert a new line after pressing ENTER. Any i think At.js has no way to hack this event or i can't find a way to do that.

A further note for TinyMCE, after inserting and it behaving odd atjs ceases to work, deleting all content within the editor then trying again however means it works again.

which browser you are using? i can't reappear this.

@ichord ichord closed this as completed Feb 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants