make tag autocomplete less scary looking in the editor. If this works out we can simplify and get rid of a huge amount of spaghetti tag logic.

This commit is contained in:
zotlabs
2018-04-24 15:32:24 -07:00
parent a6c42e8756
commit 8face5a66c
3 changed files with 82 additions and 51 deletions

View File

@@ -84,13 +84,8 @@ function editor_replace(item) {
}
// $2 ensures that prefix (@,@!) is preserved
var id = item.id;
// 16 chars of hash should be enough. Full hash could be used if it can be done in a visually appealing way.
// 16 chars is also the minimum length in the backend (otherwise it's interpreted as a local id).
if(id.length > 16)
id = item.id.substring(0,16);
return '$1$2' + item.nick.replace(' ', '') + '+' + id + ' ';
return '$1$2{' + item.link + '} ';
}
function basic_replace(item) {