我正在尝试从 CKEDITOR 获取每个具有 id 更改(change1,change2,...)的 div 的内容
var data2= CKEDITOR.instances.change1.getData();
for (var i = 2; i <= 30; i++){
if (typeof([\"CKEDITOR.instances.change\"+i]) != 'undefined') {
var edit = CKEDITOR.instances.change[i].getData();
data2 = data2 + '</div><div class=\"d W1 h1\">' + edit;
}}
我已经尝试过这样但收到错误:TypeError: CKEDITOR.instances.change is undefined at
var edit = CKEDITOR.instances.change[i].getData();