我有一个脚本可以在用户从
对于<输入字段,我所做的是:
$(document).on('autocompletechange change', '.ajSaveObj input, .ajSaveObj select, .ajSaveObj textarea', function() { ajSaveProces( $(this) ); });
我想在该声明中包括编辑。
要建立一个 CKEditor,我使用的是:
$(document).arrive( ".makeCKEditor", function() { makeCKEditor( $(this) ); });
function makeCKEditor( obj ) {
var obj_id = obj.attr('id');
// If object doesn't have an ID add one.
if( typeof( obj_id ) == "undefined" ) {
obj_id = makeid( 16 );
obj.attr( 'id', obj_id );
}
// Create the editor
var editor = ClassicEditor.create( document.querySelector( "#" + obj_id ) );
}
我不擅长 Java Script,所以如果这很明显,我深表歉意。我尝试阅读有关 FocusObserver (https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_view_observer_focusobserver-FocusObserver.html) 的 CKEditor 文档,但我无法理解。我能找到的关于此的唯一其他帖子是几年前的不同版本。
提前致谢!