Skip to content
ichord edited this page Jan 1, 2015 · 2 revisions

for TinyMCE 3

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});
          });
        }
      });

for TinyMCE 4

Live Demo: https://github.com/ichord/At.js/blob/master/examples/tinyMCE.html

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