在 suneditor 中触发 @ 事件时从数据库中提及用户

问题描述

我在 reactjs 中使用 Suneditor。现在在这里我想在编写描述时从数据库中提及一些用户名。但是我无法使用 suneditor 找到任何“提及”插件。有什么办法可以使用 suneditor 实现它?提及的用户名将被标记为蓝色并带有下划线。任何参考链接都将使用 suneditor 进行查看。

<MentionsInput
    className="comments-textarea"
    placeholder=""
    value={this.state.value}
    onChange={this.handleChange}
    onSelect={this.handleSelection}
    onBlur={this.handleBlur}
    markup={this.state.markup}
    autoFocus
>
    <Mention
        className="comment-user"
        type="user"
        trigger="@"
        data={this.state.totalUserList}
    />
</MentionsInput>

我之前使用过react提及插件。我可以在满足上述要求的情况下在suneditor中使用它吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)