如何在froala中获取keyCode
How to get keyCode in froala
在 froala 编辑器上获取按键的 keyCode 时遇到问题
这是 froala 在 keypress
上提议的代码
$('#editor1').on('froalaEditor.keypress', function (e, editor, keypressEvent) {
alert(e.keyCode);
});
https://jsfiddle.net/szpfw12c/#fork
我不确定。感谢您的帮助!
这是解决方案
使用 keypressEvent 获取键码(不是 e)
$('.edit').froalaEditor()
$('.edit').on('froalaEditor.keypress', function (e, editor, keypressEvent){
alert(keypressEvent.which);
});
如果您找到有关活动的信息,请查看
在 froala 编辑器上获取按键的 keyCode 时遇到问题 这是 froala 在 keypress
上提议的代码 $('#editor1').on('froalaEditor.keypress', function (e, editor, keypressEvent) {
alert(e.keyCode);
});
https://jsfiddle.net/szpfw12c/#fork 我不确定。感谢您的帮助!
这是解决方案
使用 keypressEvent 获取键码(不是 e)
$('.edit').froalaEditor()
$('.edit').on('froalaEditor.keypress', function (e, editor, keypressEvent){
alert(keypressEvent.which);
});
如果您找到有关活动的信息,请查看