ichord/At.js

Option to customize the wrapper for the inserted html?

Opened this issue · 1 comments

Thanks for a great library!

When inserting a selection it gets wrapped in a span, like:

<span class="atwho-inserted" data-atwho-at-query="@jonny" contenteditable="false">@jonny_appleseed</span>

Is there not an option to customize this? I can change what goes inside of it, but I'd rather change it so the data-atwho-at-query is equal to another piece of the data, like the user's ID. Right now, if I edit the insertTpl to be something like:

 "<span data-mentioned-user='${id}'>@${name}</span>"

it puts it inside of the other span, which is OK but not ideal. Does this make sense? Did I just miss it in the documentation?

Thanks!

+1

I am also looking for something to config inserted selection. Because now I am clearing inserted text from html class, which I dont need in this case.