How to initiate at.js to read as user types in tinymce editor

currently i’m trying to create a facebook style tagging system with tinymce3 editor(i don’t have a choice to upgrade to 4th version) and i’m following this example here https://github.com/ichord/At.js/wiki/usage-with-TinyMCE. The problem is i’m not able to initiate the facebook style dropdown tagging system as i type in the editor. can anyone help me with this. the code i tried so far:

tinyMCE.onAddEditor.add(function(mgr, ed) {
    var editor = $('#' + ed.editor + '.atjs');
    var names = ["Jacob","Isabella","Ethan","Emma","Michael","Olivia","Alexander","Sophia","William","Ava","Joshua","Emily","Daniel","Madison","Jayden","Abigail","Noah","Chloe","你好","你你你", "jeremy"];
    if (editor.length == 1) {
        ed.onInit.add(function(ed, l) {
            $(ed.contentDocument.activeElement).atwho({at: "@",data: "names"});
        });
    }
});

What platform is the tinyMCE embedded into?

php,html @chrisofarabia

@chrisofarabia any solutions on your mind bro

I’ve not tried to work with tinyMCE at all, so I’m unlikely to be of much help. My main concern was that other members had a little more context around the setting in which it would be used.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.