tinymce tag complete - only replace tagged text

This commit is contained in:
friendica 2012-10-09 17:03:00 -07:00
parent 17679152d5
commit 987b8b4880

View File

@ -104,7 +104,7 @@ ACPopup.prototype._search = function(){
else { else {
txt = tinyMCE.activeEditor.getContent(); txt = tinyMCE.activeEditor.getContent();
// alert(that.searchText + ':' + t); // alert(that.searchText + ':' + t);
newtxt = txt.replace(that.searchText,t+' '); newtxt = txt.replace('@' + that.searchText,'@' + t +' ');
tinyMCE.activeEditor.setContent(newtxt); tinyMCE.activeEditor.setContent(newtxt);
tinyMCE.activeEditor.focus(); tinyMCE.activeEditor.focus();
that.close(); that.close();