Support

Account

Forum Replies Created

  • Eliot,

    thanks about acf_the_content!

    About TinyMCE: fixed after I’ve added as admin script:

    acf.add_filter(‘wysiwyg_tinymce_settings’, function( mceInit, id, field ){
    // is true before
    mceInit[‘wpautop’] = false;

    return mceInit;
    });

    Thanks!

  • Can anybody help? Support doesn’t reply, too.

  • For stopping removing <p> tags inside WordPress TinyMCE (classic) editor (during switch Visual and Text editor’s tabs),

    I add to ${THEME_FOLDER}/functions.php:

    remove_filter( ‘the_content’, ‘wpautop’ );
    remove_filter( ‘the_excerpt’, ‘wpautop’ );
    remove_filter( ‘term_decription’, ‘wpautop’ );

    function config_tinymce( $config ) {
    $config[‘wpautop’] = false;
    return $config;
    }
    add_filter( ‘tiny_mce_before_init’, ‘config_tinymce’, 10 );

    But this doesn’t work for ACF’s fields editors.

    Help, please? Thanks!

    ———————

    Spoiler:

    function acf_wysiwyg_remove_wpautop() {
    remove_filter( ‘acf_the_content’, ‘wpautop’ );
    }
    add_action( ‘acf/init’, ‘acf_wysiwyg_remove_wpautop’);

    with

    remove_filter( ‘acf_the_content’, ‘wpautop’ );

    don’t work.

    I think, we need something like (analogue of)

    function config_tinymce( $config ) {
    $config[‘wpautop’] = false;
    return $config;
    }
    add_filter( ‘tiny_mce_before_init’, ‘config_tinymce’, 10 );

  • Ok, you’re right. At last, “” isn’t a value for text field.

    But, then, we need a tri-state field 😀

    • True
    • False
    • undefined
  • John, thanks for reply!

    But… False is also a value, no?

    The field is required. It is expected to have a value. False is also a value.

Viewing 5 posts - 1 through 5 (of 5 total)