The Wysiwyg editor field is working for me minus the missing HTML button. Which I really need!!
same problem here :(( any new results to fix the problem? Nextgen galleries do not work in my wysiwyg repeater fields…
btw… nextgen gallery 1.9 works!
Lost the HTML button as well, but so far, no luck in getting the issue resolved. I updated to the latest version, via the link above, and the “HTML” button on the sink WYSIWYG has yet to show up.
There is an HTML editor on the ACF WYSIWYG editor. Click the last button on the right to reveal an extra row of buttons. You’ll see the HTML button there.
Looks like this is no longer true as of WP 3.9 (on FC/Repeaters anyway). Anyone know how to get it back?
I’ve lost the ‘html’ button on my WYSIWYG content boxes. Any help? Also, tinymce doesn’t show any ‘html’ buttons anywhere.
Thank you for any help!!
Found the way by myself:
add_filter('acf/get_valid_field/type=wysiwyg', 'my_get_valid_field_post_content');
function my_get_valid_field_post_content( $field )
{
if ( $field['name'] == 'post_content' )
$field['type'] = 'textarea';
return $field;
}
But please reply to part 2 of my first message about difference between version 4 and 5 and how they work with post_content.
Thanks in advance!
Confirmed in 3.9 RC 1 with WYSIWYG in flexible content fields. Getting errors from the new version of TinyMCE, it looks like.
I just encountered this same issue and cannot seem to fix it. No errors showing up in the Chrome console to indicate any kind of conflict or Javascript error. Stock standard theme with no other plugins installed except Advanced Custom Fields and my purchased premium addons.
I am using the latest version of WordPress as well (auto-updated).
I am trying to use the WYSIWYG editor inside of a Flexible Content Field. I’ve tried both full and basic modes for the toolbar, also enabling and disabling the media upload button.
No formatting buttons seem to appear above the editor whatsoever. The formatting toolbar has vanished. Weirdly, if I say yes to having a media upload button, it does show, but it is the only button you can see. The content editor section itself is showing me HTML code, not the styled view you would usually expect from a WYSIWYG editor. It is acting like the text tab has been clicked as opposed to the default visual tab. It’s almost like the editor isn’t being applied at all.
At first I thought maybe it was the Flexible Content Field functionality breaking the editor, but then I tried just adding in a standalone field and seeing if that worked, but the editor was also broken there as well. I also tried various combinations and embedding within the repeater field and whatnot.
Is this a known issue? I couldn’t find much out there in regards to info or other people having this issue except this topic.
Hi
i do something wrong. The first part already works, but i can’t display the value. I want to create a new “SEO text field” and added an wysiwyg-field, which show up at every category.
But
<p><?php the_field('myafcfield', $term); ?></p>
<p><?php the_field('myafcfield', $taxonomy); ?></p>
dont show anything. I have the right template and cache is disabled.
what i have todo ?
regards
waterlemon
Eventually figured this out! FYI, here’s the code in case it helps anyone. The name of my WYSIWYG field is ‘about_this_product_category’, which you would replace with your own field name.
<?php
// vars
$queried_object = get_queried_object();
$taxonomy = $queried_object->taxonomy;
$term_id = $queried_object->term_id;
// load desc for this taxonomy term (term object)
$thumbnail = get_field('about_this_product_category', $queried_object);
// load desc for this taxonomy term (term string)
$thumbnail = get_field('about_this_product_category', $taxonomy . '_' . $term_id);
?>
<?php the_field( 'about_this_product_category', $queried_object ); ?>
I copied the archive-product.php from the WooCommerce plugin directory into a new /woocommerce/ folder inside my theme.
Hi,
I’m also really curious if you are planning on supporting the 3.9 version as soon as they release it. I started building a custom WYSIWYG, but just figured out they completely change tinyMCE from api3 to api4. So it might be easier.
Thanks again for these amazing plugins!
Steph
I think I know what is being asked, because I’m having a similar question.
Some plugins that implement advanced typography functions (such as footnotes) seem to scan only within default WP the_content to run actions of what they do, missing WYSIWYG content from ACF Repeater or Flex Content fields.
Probably going to be on the plugin side of code to get them to loop thru ACF content…?
I did try the same thing inserting on nextgen gallery in wysiwyg acf field it works but in flexible content it doesn’t work.
Sorry I did put it on the wrong wysiwyg built-in wp not the acf wysiwyg field, I did recheck an its doesn’t render the gallery.
I think NextGen has custom code/tag to identify and render the gallery. Its not using a shortcode anymore. 🙁
Hope to hear from you end.
Thanks
hi elliot,
Good day
Also I am having problem rendering NextGen Gallery in wysiwyg editor. Please see code below.
if (get_sub_field('column')) {
$row_count = count(get_sub_field('column'));
while (has_sub_field('column')) {
$str_ret .='<div class="item-wrapper">';
$str_ret .= '<h4 class="item-title">' . get_sub_field('title') . '</h4>';
if(get_sub_field('type')=='content'){
$content = get_sub_field('content');
}else{
$p = get_sub_field('widget');
$content = $p->post_content;
}
$str_ret .= '<div class="item-content">'.$content.'</div>';
$str_ret .='</div>';
}
}
echo $str_ret;
I am trying to create a multiple column content using flexible content wysiwyg editor but all I am getting is the one image. NextGen code will be like this <img alt="" src="http://domain.com.au/nextgen-attach_to_post/preview/id--3262" />
not same old shortcode.
Hope to hear from your end.
Thanks
I have this issue as well. I just created a new field group with one WYSIWYG field. I added the group to my blog page, but when I type text in the ACF WYSIWYG editor and update the page, the editor is blank after the page refreshes (so my text is not saved).
I created a new page to test and for some reason was able to successfully save the custom field on that page. Somehow it seems to be specific to my Blog page, as if it has gotten corrupted or something? I don’t see any JS errors.
Here’s how I set ACF within my plugins. Works well for me and doesn’t conflict when I have multiple plugins using ACF.
// Check if ACF is used with another plugin, if not already called, use this one if( ! class_exists('acf') ) { // Load only limited functionality define( 'ACF_LITE' , true ); // Load the ACF Core include_once( SET_PLUGIN_NAME_DIR . '/includes/acf/acf.php'); // Repeater Add-On if( ! class_exists('acf_repeater_plugin') ) { include_once( SET_PLUGIN_NAME_DIR . '/includes/acf/add-ons/acf-repeater/acf-repeater.php'); } // Reapeater Collapser Add-on if( ! class_exists( 'acf_repeater_collapser_assets' ) ) { include_once( SET_PLUGIN_NAME_DIR . '/includes/acf/add-ons/acf-repeater-collapser/acf_repeater_collapser.php'); } // Options Add-on if( ! class_exists('acf_options_page_plugin') ) { include_once( SET_PLUGIN_NAME_DIR . '/includes/acf/add-ons/acf-options-page/acf-options-page.php'); // Remove the defualt "Options" Page from ACF as it would be included within the plugin menu or elsewhere. if( ! function_exists("remove_acf_options_page")) { function remove_acf_options_page() { remove_menu_page('acf-options'); } add_action('admin_menu', 'remove_acf_options_page', 99); } } // WYSIWYG Editor Add-on if( ! class_exists( 'acf_field_wp_wysiwyg_plugin' ) ) { include_once( SET_PLUGIN_NAME_DIR . '/includes/acf/add-ons/acf-wp-wysiwyg/acf-wp_wysiwyg.php'); } // Gallery Add-on if( ! class_exists( 'acf_field_gallery' ) ) { include_once( SET_PLUGIN_NAME_DIR . '/includes/acf/add-ons/acf-gallery/acf-gallery.php'); } // Address Field Add-on if( ! class_exists( 'acf_field_address_plugin' ) ) { include_once( SET_PLUGIN_NAME_DIR . '/includes/acf/add-ons/acf-field-address/acf-address.php'); } }
Hi @tatemz
Can you remove the conditional logic from the WYSIWYG field and test if this effects the issue?
Also, what edit screen are these fields on? It doesn’t look like a normal post from the screenshot. This may be related to the issue
Thanks
E
Hi @dalbeck
You can achieve this by writing some custom jQuery / PHP. If you are not familiar with writing custom jQuery / AJAX / PHP scripts, you may need to contract a developer to do this for you.
Upon ‘change’ of the post object field, you will need to perform a custom AJAX query to get the selected post’s content.
With the post’s content returned, you will then need to use JS to update the WYSIWYG field. This is not the easiest task, but is possible by reading over the js/input.js
file and scrolling down to the WYSIWYG section. You will see many tinymce functions which you can use to update the value.
Thanks
E
I added this to my functions file, and replaced the placeholder with my wysiwyg field name.
Just to confirm, I’ve tried this out and it works.
Thanks Elliot!
It’s happening with all plugins disabled as well, even if I remove the wysiwyg sub-field, but without js errors. I’ll do some debugging in the next few days and get back to you.
Hi @Bondra
Thanks.
It is possible that the shortcode plugin is only made to insert into the main WYSIWYG editor. I would contact the shortcode developer and ask them if the plugin is compatible with ACF or any extra WYSIWYG editors on the page.
Thanks
E
What do you mean by ‘display this syntax highlighter inside the wysiwyg textarea output’?
Thanks
E
Hi @mlohscheidt
I’m not sure I understand the issue.
The have_rows function will load the repeater field’s data and check that there are rows available. The WYSIWYG sub field values will also be loaded, and the values will be formatted (shortcodes will be run).
Perhaps the issue is with your shortcodes. Normally, a shortcode filter would modify the content, not echo out some HTML.
Is it possible that you can change your shortcode filters to return the value instead of outputting it?
Thanks
E
Heya!
This is the output:
acf.fields.wysiwyg.toolbars = {
"full": {
"theme_advanced_buttons1": "bold,italic,strikethrough,bullist,numlist,blockquote,justifyleft,justifycenter,justifyright,link,unlink,wp_more,AtD,fullscreen,wp_adv",
"theme_advanced_buttons2": "formatselect,underline,justifyfull,forecolor,pasteword,removeformat,charmap,outdent,indent,undo,redo,wp_help,code",
"theme_advanced_buttons3": "",
"theme_advanced_buttons4": ""
},
"basic": {
"theme_advanced_buttons1": "bold,italic,underline,blockquote,strikethrough,bullist,numlist,justifyleft,justifycenter,justifyright,undo,redo,link,unlink,fullscreen"
}
};
Thanks too Elliot!!! I was trying and searching the forums across the net for a solution for my hassle about a custom excerpt function for a acf wysiwg field for weeks. The combination of add_filter(‘acf_the_content’, ‘wpautop’); and
the_field(‘wysiwyg_field’, false, false); saved me. Drove me crazy 😀
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.