• Resolved yliya14

    (@yliya14)


    Hello. Is there any snippet to include an advanced editor in all text area fields. Is it the same as in the ad description?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Mahfuzul Alam

    (@mahfuz87)

    Hello

    Thank you for reaching out.
    You can achieve this by overriding templates and using custom code.

    You can learn more on overriding templates here – Template Override (directorist.com)

    Please override the textarea.php ( https://prnt.sc/nDNId10otTL3 ) file with the following code using a child theme –

    <?php
    
    /**
    
    * @author wpWax
    
    * @since 6.6
    
    * @version 7.4.0
    
    */
    
    if (!defined('ABSPATH')) exit;
    
    $maxlength = $data['max'] ?? '';
    
    ?>
    
    <div class="directorist-form-group directorist-form-description-field">
    
    <?php
    
    $listing_form->field_label_template($data);
    
    wp_editor(
    
    wp_kses_post($data['value']),
    
    $data['field_key'],
    
    apply_filters(
    
    'atbdp_add_listing_wp_editor_settings',
    
    array(
    
    'media_buttons' => false,
    
    'quicktags' => true,
    
    'editor_height' => 200,
    
    )
    
    )
    
    );
    
    $listing_form->field_description_template($data);
    
    ?>
    
    <div id="directorist_listing_description_indicator"></div>
    
    </div>

    This should be enable advance editor for all textarea fields. You can contact to our support channel if you need face any issue while implementing the code.

    Kind Regards

    Thread Starter yliya14

    (@yliya14)

    Thank you. I will definitely try

    Hello,

    Thank you @mahfuz87

    I had the same request, I wanted to have multiple textareas with wp_editor. I override the textarea.php file with your suggested code. This gives me a textarea field with wp_editor. I can enter and format my text in the editor, but after saving the entry, all formatting (like bold) disappears. Do you have an idea what to do to keep the formatting (otherwise the editor is not really usefull).

    Thank you very much in advance for your help.

    Kind regards, Mireille

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘advanced editor’ is closed to new replies.