]> git.mxchange.org Git - friendica.git/blobdiff - js/fk.autocomplete.js
Merge pull request #935 from annando/master
[friendica.git] / js / fk.autocomplete.js
old mode 100755 (executable)
new mode 100644 (file)
index b1db92c..2334bb4
@@ -89,7 +89,7 @@ ACPopup.prototype._search = function(){
        });
        
 }
-       ACPopup.prototype.add = function(label, value){
+ACPopup.prototype.add = function(label, value){
        var that=this;
        var elm = $("<div class='acpopupitem' title='"+value+"'>"+label+"</div>");
        elm.click(function(e){
@@ -104,7 +104,7 @@ ACPopup.prototype._search = function(){
                else {
                        txt = tinyMCE.activeEditor.getContent();
                        //                      alert(that.searchText + ':' + t);
-                       newtxt = txt.replace(that.searchText,t+' ');
+                       newtxt = txt.replace('@' + that.searchText,'@' + t +' ');
                        tinyMCE.activeEditor.setContent(newtxt);
                        tinyMCE.activeEditor.focus();
                        that.close();