欢迎各位兄弟 发布技术文章
这里的技术是共享的
Ueditor remove textarea id attribute cause wysiwyg module error on detach action.
Comment | File | Size | Author |
---|---|---|---|
#2 | 862 bytes | ipumpkin | |
5.15 KB | ipumpkin |
ueditor_wysiwyg_ajax_error-2859069-2.patch 的内容如下
https://www.drupal.org/files/issues/ueditor_wysiwyg_ajax_error-2859069-2.patch 对着它进行修改就可以了
diff --git a/wysiwyg.js b/wysiwyg.js index 4e566db..290b8a7 100644 --- a/wysiwyg.js +++ b/wysiwyg.js @@ -194,7 +194,11 @@ Drupal.behaviors.attachWysiwyg = { } var form = this; $('.wysiwyg:input', this).each(function () { - Drupal.wysiwygDetach(form, this.id, 'serialize'); + var id = this.id; + if(!id){ + id = $(this).prev().attr('id'); + } + Drupal.wysiwygDetach(form, id, 'serialize'); }); }); }, @@ -212,7 +216,11 @@ Drupal.behaviors.attachWysiwyg = { wysiwygs = $('.wysiwyg:input', context).removeOnce('wysiwyg'); } wysiwygs.each(function () { - Drupal.wysiwygDetach(context, this.id, trigger); + var id = this.id; + if(!id){ + id = $(this).prev().attr('id'); + } + Drupal.wysiwygDetach(context, id, trigger); }); } };
下面的可以不看
和entityreference_view_widget模块有冲突,在node/add/article页面,无法弹出此模块的窗口,错误提示:An error occurred while attempting to process /system/ajax: Wysiwyg module has no information about field ""
禁用ueditor模块后恢复正常。
来自 https://www.drupal.org/project/ueditor/issues/2446025
和百度编辑器 ueditor 有冲突吧
.....if(holder.id){newDiv.id=holder.id;domUtils.removeAttributes(holder,'id');}.....
zhiqiang.qiu |
Comments
Comment#1
360032368@qq.com CreditAttribution: 360032368@qq.com commented按照https://www.drupal.org/node/2286333修改文件后,此问题也同时解决。