Hello!
I include edit title and post content for the frontend forms.
This code:
acf_form(array(
'post_title' => true,
'post_content' => true,
),
But in this case I can not adjust the field name and post content as the other fields of the ACF. However, I would like to change the settings of the field post content. For example, I would like to disable HTML (Text) Tab in post editor. Leave only the visual editor.
Settings that work to backend forms, for example:
function my_editor_settings($settings) {
$settings['quicktags'] = false;
return $settings;
}
add_filter('wp_editor_settings', 'my_editor_settings');
It does not work for front-end ACF forms. Any suggestions how to do it?
Hi @buylov
To remove the Visual/Text tab, you can edit your WYSIWYG field and set the “Tabs” as “Visual Only”.
I hope this helps.
Yes, but ‘post_content’ is not a field ACF. This is a required field post.
Hi @buylov
The easiest way would be using CSS to hide it. Something like this:
div[data-name="_post_content"] .wp-editor-tabs {
display: none;
}
Hope this does the trick!
Hi, how can I hide the Text tab for all users, but admins ?
Thanks a lot and best regards
Beat
This is ridiculous, it does not disable the tab, only hides it.
Changing field behavior doesn’t seem to work on the front end with acf_form even though it works on the admin areas. I have tried many filters and actions specific to acf, tinymce, wp_editor_settings, nothing works. Trying to unset toolbars doesn’t work even with the example code in the documentation. The only thing i could do is disabling visual editor, even then the quick tags won’t disappear.