
Hi @robert-pal
There’s a filter you can use to modify the toolbars without altering the code directly
acf/fields/wysiwyg/toolbars
which takes in the $toolbars variable which is an array. You might be able to use that to modify the toolbar to show only exactly what you’d want.
I worked it out that I can change the defaults of the Wysiwyg Editor in fields/wysiwyg.php , but wonder if there is a way to pass the parameters trough the acf_from() function
It’d be nice to add these to ACF wysiwyg fields exclusively, different from the other wysiwyg fields default in wordpress.

Hi @roflman79
Unfortunately ACF does not yet support Distraction free mode. However you can make use of the “Full screen mode” that is available on the WYSIWYG toolbar.
1) no other filter, just frontend templates
2) As you can see I use 2 field groups in the acf_form. The first one is made just for frontend form (is where I have post title, content and featured image), the second one (where I have the issue) is the very same I use in backend.
3) IN the 2nd field group I have 6 fields, in this order:
– true/false field (true is the condition for all the following fields to show) – working
– wysiwyg field – working
– flexible content field (inside there are 4 layouts, with a total of 11 subfields) – not working
– flexible content field (inside there are 2 layouts with a total of 5 subfields) – Not working
– flexible content field (inside there are 2 layouts with a total of 3 subfields) – Not working
– wysiwyg field – working
If you want to try, I’ve exported both groups in this zip file https://dl.dropboxusercontent.com/u/3261727/field-groups.zip
PS: I’ve tried not to use the second group (the complex one) and using another one just with 1 repeater field with only one text subfield, same problem: data is sent from the form, rows are created in backend but values are empty, infact in database I can see serialized strings like this one: a:2:{i:0;s:1:”A”;i:1;s:1:”A”;}
Further update.
debugging the form data with chrome dev tools, it looks like the values are sent, but for some reason they are not saved in db
here it is the admin-ajax.php form data sent in headers
_acfnonce:d1c835265a
_acfchanged:1
_acf_form:eyJpZCI6ImZyb250ZW5kLXJlY2lwZSIsInBvc3RfaWQiOiJuZXciLCJuZXdfcG9zdCI6ZmFsc2UsImZpZWxkX2dyb3VwcyI6WyJncm91cF81NTllOWVkYjQwZmNhIiwiZ3JvdXBfNTU5ZTllZGI1Yzg1ZCJdLCJmaWVsZHMiOmZhbHNlLCJwb3N0X3RpdGxlIjpmYWxzZSwicG9zdF9jb250ZW50IjpmYWxzZSwiZm9ybSI6dHJ1ZSwiZm9ybV9hdHRyaWJ1dGVzIjp7ImlkIjoicG9zdCIsImNsYXNzIjoiIGFjZi1mb3JtIiwiYWN0aW9uIjoiIiwibWV0aG9kIjoicG9zdCJ9LCJyZXR1cm4iOiJodHRwOlwvXC93d3cubm9ubmFwYXBlcmluYS5pdFwvaW5zZXJpc2NpLXJpY2V0dGFcLz91cGRhdGVkPXRydWUiLCJodG1sX2JlZm9yZV9maWVsZHMiOiIiLCJodG1sX2FmdGVyX2ZpZWxkcyI6IiIsInN1Ym1pdF92YWx1ZSI6IkludmlhIFJpY2V0dGEiLCJ1cGRhdGVkX21lc3NhZ2UiOiJTYWx2YXRvISIsImxhYmVsX3BsYWNlbWVudCI6InRvcCIsImluc3RydWN0aW9uX3BsYWNlbWVudCI6ImxhYmVsIiwiZmllbGRfZWwiOiJkaXYiLCJ1cGxvYWRlciI6ImJhc2ljIn0=
acf[field_559a8e6366915]:This is the post title
acf[field_559a8e7b66916]:this is the post content
acf[field_559a8eb766918]:C:\fakepath\80_IMG_2650.jpg
acf[field_5368b65e4cd39]:1
acf[field_5383505f17035]:this is another wysiwyg field
acf[field_5368bdb913e74]:
acf[field_5368bdb913e74][acfcloneindex][acf_fc_layout]:recipe_tot_time
acf[field_5368bdb913e74][acfcloneindex][field_5368beb2078cc]:
acf[field_5368bdb913e74][acfcloneindex][field_5368bf64078cd]:
acf[field_5368bdb913e74][acfcloneindex][field_536cfd2d6fa7a]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfd516fa7b]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfdab6fa7c]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfb9f6fa76]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfbfb6fa77]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfc516fa78]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfeb06fa7f]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfed36fa80]:0
acf[field_5368bdb913e74][acfcloneindex][field_536cfef46fa81]:0
acf[field_5368bdb913e74][559fe5a1e1e57][acf_fc_layout]:recipe_dosi
acf[field_5368bdb913e74][559fe5a1e1e57][field_5368beb2078cc]:5
acf[field_5368bdb913e74][559fe5a1e1e57][field_5368bf64078cd]:people
acf[field_5368bdb913e74][559fe5a7e1e58][acf_fc_layout]:recipe_prep_time
acf[field_5368bdb913e74][559fe5a7e1e58][field_536cfd2d6fa7a]:0
acf[field_5368bdb913e74][559fe5a7e1e58][field_536cfd516fa7b]:0
acf[field_5368bdb913e74][559fe5a7e1e58][field_536cfdab6fa7c]:30
acf[field_5368bdb913e74][559fe5afe1e59][acf_fc_layout]:recipe_cook_time
acf[field_5368bdb913e74][559fe5afe1e59][field_536cfb9f6fa76]:0
acf[field_5368bdb913e74][559fe5afe1e59][field_536cfbfb6fa77]:0
acf[field_5368bdb913e74][559fe5afe1e59][field_536cfc516fa78]:20
acf[field_5368bdb913e74][559fe5b2e1e5a][acf_fc_layout]:recipe_tot_time
acf[field_5368bdb913e74][559fe5b2e1e5a][field_536cfeb06fa7f]:0
acf[field_5368bdb913e74][559fe5b2e1e5a][field_536cfed36fa80]:0
acf[field_5368bdb913e74][559fe5b2e1e5a][field_536cfef46fa81]:50
acf[field_53694b8b14a44]:
acf[field_53694b8b14a44][acfcloneindex][acf_fc_layout]:recipe_ingredient
acf[field_53694b8b14a44][acfcloneindex][field_5369557ce3365]:
acf[field_53694b8b14a44][acfcloneindex][field_53694c0014a45]:
acf[field_53694b8b14a44][acfcloneindex][field_53694c8514a46]:
acf[field_53694b8b14a44][acfcloneindex][field_53694cdd14a47]:
acf[field_53694b8b14a44][acfcloneindex][field_53694cf514a48]:
acf[field_53694b8b14a44][559fe5b7e1e5b][acf_fc_layout]:recipe_ingredient
acf[field_53694b8b14a44][559fe5b7e1e5b][field_53694c0014a45]:1
acf[field_53694b8b14a44][559fe5b7e1e5b][field_53694c8514a46]:spoon
acf[field_53694b8b14a44][559fe5b7e1e5b][field_53694cdd14a47]:sugar
acf[field_53694b8b14a44][559fe5b7e1e5b][field_53694cf514a48]:
acf[field_53694b8b14a44][559fe5c1e1e5c][acf_fc_layout]:recipe_ingredient
acf[field_53694b8b14a44][559fe5c1e1e5c][field_53694c0014a45]:200
acf[field_53694b8b14a44][559fe5c1e1e5c][field_53694c8514a46]:ml
acf[field_53694b8b14a44][559fe5c1e1e5c][field_53694cdd14a47]:water
acf[field_53694b8b14a44][559fe5c1e1e5c][field_53694cf514a48]:
acf[field_536954f9e3362]:
acf[field_536954f9e3362][acfcloneindex][acf_fc_layout]:recipe_process_step
acf[field_536954f9e3362][acfcloneindex][field_53695987027e2]:
acf[field_536954f9e3362][acfcloneindex][field_5369588b92009]:
acf[field_536954f9e3362][acfcloneindex][field_536958c19200a]:
acf[field_536954f9e3362][559fe5d5e1e5d][acf_fc_layout]:recipe_process_step
acf[field_536954f9e3362][559fe5d5e1e5d][field_5369588b92009]:pur sugar in water
acf[field_536954f9e3362][559fe5d5e1e5d][field_536958c19200a]:
acf[field_536954f9e3362][559fe5dce1e5e][acf_fc_layout]:recipe_process_step
acf[field_536954f9e3362][559fe5dce1e5e][field_5369588b92009]:mix a lot and drink
acf[field_536954f9e3362][559fe5dce1e5e][field_536958c19200a]:
acf[field_53695a0dcfde2]:this is yet another wysiwyg field
action:acf/validate_save_post
PS: what is “acfcloneindex”?

Hi @njs
I’m not sure wether this is ACF or WP Core “fault”.
Pretty sure that the ACF wysiwyg-field makes use of the wp_editor function provided by WordPress to output an editor (like any other plugin usually do):
https://codex.wordpress.org/Function_Reference/wp_editor
And it does not seem to have a setting for this. So my guess is that WP Core doesn’t support the same behaviour for editors created with that function as the core editor.
Have you looked into it any further, done some googling on editors in WP in general?

What version of ACF are you using? Is this for an image field of a wysiwyg field?

Thank you for the question.
This issue is quite strange, there could be a theme conflict that is affecting the rendering of the WYSIWYG toolbar.
Does the same issue replicate when using one of the stock WP themes?
My tone is civil. The worst thing I said is “you are wrong”, which is my opinion, based in the answers you give me. Please don’t take it personal, as none of my words insinuated that.
For the ammount of words… sorry, but I need them to be clear when i think I’m not being understood. Maybe your developers could consider not to dismiss a request with a rushed up answer? When an answer doesn’t add up, I bring it up.
The repeater fields doesn’t work to make field layouts… Maybe I was confused because YOU DID call them “layouts”!
The repeater field leaves a hole in table mode when the fields are conditionally hidden (of course, because there’s a table header needing to match)
The word “layout” DOES REFER to the ARRANGEMENT of things, NOT to the types and data or the data itself. I don’t feel bad by thinking they were meant to work as layouts.
Can you think any other way to prevent the browser to become unresponsive with 10 rows of 8 wysiwyg fields each? (I’m not even counting the conditionally hidden ones!)
I do need the wysiwyg fields, to let the user to enter bullet points because of the nesting levels…
Unless you add some kind of YAML field? where users can quickly enter data with leading dashes or tabs, to define lists, arrays…
Later we, programmers, could convert each nesting level into title, content, even complex layouts, from plain text. Without the need for multiple wysiwyg fields, or field layouts.
Thanks.

Yes, exactly. You can create field groups that are attached to the terms of a taxonomy the same way that field groups are attached to a post. When editing a term, like a category or tag, the fields can be completed.
For example, you can add an image field so that you can associate an image with the term. Or you can add a WYSIWYG editor to allow for editable content for a term just like the editor for a post.
Hope this helps.
~JH

Hi @waffl
It would seem like either acf-qtranslate or qtranslate-x is adding the code and then it gets wrapped with wpautop. I’m guessing qtranslate-x has some code to prevent that in the regular editor but it doesn’t run in ACFs.
It seems there’s a lot of people having issues with the wysiwyg-editor as well if you check the support forums:
https://wordpress.org/support/topic/wysiwyg-not-working-properlly?replies=7
https://wordpress.org/support/topic/wysiwyg-qtranslatex-editor-is-multiplying-content?replies=7
I think it’s something that needs to be fixed by either acf-qtranslate or qtranslate-x. ACF supports WPML out of the box and if you’re up for switching Polylang is a great free alternative. I’ve used it myself with ACF on multiple occasions 🙂
https://wordpress.org/plugins/polylang/
I want to add new ROWS to an EMPTY flexible content field, based (e.g. exploded w/JS) from ANOTHER acf field (or the wp editor).
For future visitors: I already made my importer processing the fields with a function hooked to acf/save_post wordpress hook.
It parses a whole powerpoint presentation into slides, including base64 images, something I recommend you to add to your plugin, like “image elevator” 🙂
It seems that “update_field” is all I needed. I thought there would be some sort of “add row”… but since the whole thing is a acf field…
The only problem I found is the last ticket I submitted. One sub-field doesn’t makes it to the DB but it doesn’t come out to the editor. Please take a look at it. I can send you my code, but really, I checked the field BEFORE update_field, and it was ok, as well as the data found in the DB. But no show.
About image-elevator: One could just install it, and paste the images in a wysiwyg editor, but as it happened to me, my wordpress post ended up with two wysiwyg editors for each row, (apparently one many more than it was designed for) which made the browser twice as slow.
And I had to modify their plugin to work from the back end, since currently theirs only works with ajax from the post editor. Anyway, allowing to “paste” an image I think it’d be a great addition 🙂
But you can leave the change in the (whatever you call your latest not-for-release version) so I can download it 🙂
If you think this is possible (using a single wysiwyg and creating a snapshot of the rest until needed) I’d do it myself.
I have no idea how, but I managed to import a whole powerpoint with base64 images and everything saved to the media library in one week 🙂
Just send me a few lines of critical points where you think I could encounter a challenge, and I’ll try it.

Hi guys.
Yes the add-on is indeed supported on the Pro version. You can grab the it from this link: https://github.com/elliotcondon/acf-wordpress-wysiwyg-field

the ACF wysiwyg field is using the built in editor in WordPress so it should be possible. However I think this falls more on the HTML Editor Syntax Highlighter author. I’m guessing he/she targets only the regular editor specifically and would have to add in the ability to target ACF editors as well.
How can I manually drag them? The field is not draggable. I put it above wysiwyg editor and it stuck there. I thought may be in the functions.php I can add some code to move it, but I don’t know php.

You can make use of the remove_filter() as posted by @rpk and you can also be achieve the same result by loading the value of the WYSIWYG field without any formatting as follows:
the_field('wysiwyg_field', false, false);

Hi @daniel7912
Thank you for the question.
There is a plugin conflict interfering with the setting of the tinyMCE object in your category page. You should check to ensure that you identify the plugin bringing about the conflict by deactivating all other installed plugins and switching to one of the stock Wp themes.
You can also try making the followng AJAX callback:
$('.acf_wysiwyg textarea').each(function() {
tinymce.execCommand('mceAddControl', false, $(this).attr('id'));
});
Thanks John. Only just seen this. Never got an email notification for some reason.
Anyway, you are right. As im using a repeater with a few wysiwyg editor fields, I am looping through the rows.
Ok, so saying I have 5 or so repeater editors and im outside the row loop, how do I target a particular editor? They all share the same field key, so I only get the last one in my form.
Thanks again John.:)

Check the content in the sub field ‘main_content’
The extra div elements being output is happening here
<?php the_sub_field('main_content'); ?>
so those div elements must be in the wysiwyg editor. This can happen when copying content from a web page and pasting it directly into a WP WYSIWYG editor.

Hi,
Okay. ACF gives you the choice of which tabs to show when creating the wysiwyg field. If you check your wysiwyg field in the field group make sure you have “Tabs” set to “Visual & text”. Then you should see the tabs unless your custom tinyMCE plugin conflicts with this.
I just tested it myself and it works 🙂
Hi Jon,
Yes that’s what I am trying to display a text tab or html button where I can see the source code.
I think acf doesn’t use text tab for WYSIWYG editor.
Thanks,
Raj

The server shouldn’t effect it.
You posted this
$field = 'editor'; // 'editor' being the field name for a wysiwyg editor
$fkey = get_sub_field_object($field); // retrieve the key for the editor
acf_form(array( 'fields' => array($fkey['key']) )); // hopefully display editor & contents
This makes me believe that you looping through the rows getting the value for $fkey and while still in that loop you’re calling acf_form(). I think you’re going to need to give me some more code to look at.
Just in case you’re unaware of this, if you put backticks around your code it will make make it look like the code I added above.
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.