Kirzzz Asked:2020-09-17 04:03:30 +0000 UTC2020-09-17 04:03:30 +0000 UTC 2020-09-17 04:03:30 +0000 UTC 如何将表情符号集成到 Jquery 文本编辑器中 772 该站点有一个标准的Jquery 文本编辑器,它以这种方式初始化: $(“.text-edit textarea”).jqte. 我想,除了标准功能外,您还可以插入表情符号/表情符号。 也许有现成的具有此功能的文本编辑器? jquery 1 个回答 Voted Best Answer Qwertiy 2020-09-17T04:33:31Z2020-09-17T04:33:31Z 好吧,表情符号只是文字。在这里,enotika 补充道:🦝🦝🦝 不幸的是,该片段不适用于 SO,因此:https ://jsfiddle.net/8e7j6n4o/ var defaultTools = "bold italic underline | format font size | color background | left center right | outdent indent | ul ol | image | link | clean | html" $('#editor').jqxEditor({ tools: defaultTools + ' | racoon', createCommand: function(name) { switch (name) { case "racoon": return { type: 'button', tooltip: 'Racoon', init: function(widget) { widget.jqxButton({ height: 25, width: 25 }); widget.html("<span style='line-height: 23px;'>🦝</span>"); }, refresh: function(widget, style) { // do something here when the selection is changed. }, action: function(widget, editor) { return { command: 'inserthtml', value: "🦝" }; } } } } }); <link rel="stylesheet" type="text/css" href="//jqwidgets.com/public/jqwidgets/styles/jqx.base.css"> <link rel="stylesheet" type="text/css" href="//jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css"> <script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="//jqwidgets.com/public/jqwidgets/jqx-all.js"></script> <textarea id="editor"></textarea>
好吧,表情符号只是文字。在这里,enotika 补充道:🦝🦝🦝
不幸的是,该片段不适用于 SO,因此:https ://jsfiddle.net/8e7j6n4o/