Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用语音键盘将英语转换成我想要的语言?_Javascript_Ckeditor_Dispatchevent - Fatal编程技术网

Javascript 如何使用语音键盘将英语转换成我想要的语言?

Javascript 如何使用语音键盘将英语转换成我想要的语言?,javascript,ckeditor,dispatchevent,Javascript,Ckeditor,Dispatchevent,我正在使用Ckeditor,我想使用语音字符转换将英语转换为我想要的语言。 我已成功转换它,但目标上的已调度事件未向我显示要编辑的新字符 newEvent.initKeyEvent("keypress", true, true, window,false, false, false, false, 0, codes[whichChar]); e.target.dispatchEvent(newEvent); 控制台向我显示以下内容: keypress { target: <body.ck

我正在使用Ckeditor,我想使用语音字符转换将英语转换为我想要的语言。 我已成功转换它,但目标上的已调度事件未向我显示要编辑的新字符

newEvent.initKeyEvent("keypress", true, true, window,false, false, false, false, 0, codes[whichChar]);
e.target.dispatchEvent(newEvent);
控制台向我显示以下内容:

keypress { target: <body.cke_editable.cke_editable_themed.cke_contents_ltr.cke_show_borders>, key: "", charCode: 1726, keyCode: 0 }
keypress{target:,key:,charCode:1726,keyCode:0}
而且,dispatched事件返回true,但在编辑器中不显示任何内容,并且目标也正确