I am trying to sisable editing in repeater wysiwyg sub field. I will be disabling the ability to edit based on user role, but for now I am just trying to get the jquery to work do disable editing of the field.
There are 2 ways I have thought to approach this thus far.
1. Set the content editable value of the iframes body tag to false
2. Get the content of the iframes body, remove the iframe, add the iframes content back in rg
var wysiwygContent = $('.post-type-installations table.acf-table tr.field_key-field_539b0c5f32390 td.acf-input iframe html body').contents();
$('.post-type-installations table.acf-table tr.field_key-field_539b0c5f32390 td.acf-input iframe').remove()
$('.post-type-installations table.acf-table tr.field_key-field_539b0c5f32390 td.acf-input').append(wysiwygContent);
I am running both functions from the admin_print_footer_scripts hook
Thus far I have had no joy with either. Oddly the second method does sporadically remove the iframe, thought it doesn’t do so every page load and it doesn’t add the content back into the td.acf-input div