晚上好,
我有一个单词,在 @ - 标记后输入:
你好,@Anto
如何将 @ 之后的所有内容替换为我自己的文本?
也许您知道,如何使用 jQuery 自动完成解决我的问题:
jQuery remote autocomplete with hashtags
谢谢
更新:
现在我在当前插入符位置之后插入文本,但用它我无法创建链接:
content = (this.name).substring(state.length-1,(this.name).length);
ed.selection.setContent(content + "|" + this.param);
最佳答案
看起来您需要使用 execCommand mceInsertContent
。
请在此处查看可能命令的完整列表:http://www.tinymce.com/wiki.php/Configuration:valid_children
关于javascript - 在 TinyMCE 中替换特定键后的单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14590739/