Home › Forums › Backend Issues (wp-admin) › Visual editor breaks when applying post-category rule + moving the editor › Reply To: Visual editor breaks when applying post-category rule + moving the editor
for those who have the same problem. thanks to James, here is the full solution:
(function($) {
$(document).ready(function(){
$("#tagsdiv-knowlendge").appendTo(".acf-field-57bc8db4167d8");
$("#tagsdiv-tools").appendTo(".acf-field-57bc8dcc167d9");
$("#tagsdiv-materials").appendTo(".acf-field-57bc8de1167da");
$("#aboutcontent").append("<div class='clear' style='height:8px;'></div>");
if( $("#in-category-1").is(':checked') ){
$('.acf-field-57bc88444d651 .acf-input').append( $('#postdivrich') );
}
else{
$("#acf-group_57bc87aa02bb7").addClass("acf-hidden");
}
$('#in-category-1').on("change", function(){
if( $(this).is(':checked') ){
$('.acf-field-57bc88444d651 .acf-input').append( $('#postdivrich') );
tinymce.EditorManager.execCommand('mceRemoveEditor',true, "content");
tinymce.EditorManager.execCommand('mceAddEditor',true, "content");
} else {
$('#post-body-content').append( $('#postdivrich') );
tinymce.EditorManager.execCommand('mceRemoveEditor',true, "content");
tinymce.EditorManager.execCommand('mceAddEditor',true, "content");
$("#acf-group_57bc87aa02bb7").addClass("acf-hidden");
}
});
});
})(jQuery);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.