Hi!
In Wp “the_editor” filter hook lets developers change the markup of the (not TinyMce) editor like so:
add_filter('the_editor', 'example');
function example($content) {
// here we're adding a "pluto" class...
$content = '<div class="pluto" id="wp-content-editor-container" class="wp-editor-container"><div id="ed_toolbar" class="quicktags-toolbar"></div><textarea class="wp-editor-area" style="height: 300px" autocomplete="off" cols="40" name="content" id="content">%s</textarea></div>';
return $content;
}
I would make the same for Acf (not TinyMce) implementation of the editor to add, for example, a “maxlength” attribute to the (not TinyMce) editor’s <textarea> of the ‘wysiwyg’ field for some fields.
Many thanks in advance for your help!
Not sure what you mean by “the (not TinyMce) editor”. Do you mean the editor in ACF Version 4?
Hi mean the ‘HTML tab’, no the ‘Visual’ one, sorry I have not expressed well, thanks!
There isn’t any way that you can “wrap” any of the ACF html output in additional div elements. You can add classes to the “wrapper” element when creating a field and you can also add classes and wrapper attributes by using the acf/prepare_field hook https://www.advancedcustomfields.com/resources/acfprepare_field/