ckeditor fixes

This commit is contained in:
rulingcom 2025-05-15 22:11:01 +08:00
parent 833f9ee185
commit 5357306c92
1 changed files with 6 additions and 0 deletions

View File

@ -747,8 +747,14 @@
parent.find(".section_type_ut").hide(); parent.find(".section_type_ut").hide();
if($(this).val() == "text"){ if($(this).val() == "text"){
parent.find(".section_type_text").show(); parent.find(".section_type_text").show();
var id = parent.find(".section_type_text textarea").attr("id");
CKEDITOR.replace(id);
}else if($(this).val() == "universal_table"){ }else if($(this).val() == "universal_table"){
parent.find(".section_type_ut").show(); parent.find(".section_type_ut").show();
if(parent.find(".section_type_text textarea").length > 0){
var id = parent.find(".section_type_text textarea").attr("id");
CKEDITOR.instances[id].destroy(true);
}
} }
}) })
<% if defined? UniversalTable %> <% if defined? UniversalTable %>