Support » Plugin: Inline Image Upload for BBPress » Disabled rich-text pasting?

  • While this plugin is activated, we can’t copy/paste rich-text. We have found following code (bbp-image-upload.php):

    add_filter('bbp_after_get_the_content_parse_args', 'hm_bbpiu_modify_editor', 9999);
    function hm_bbpiu_modify_editor($args = array()) {
            if (!isset($args['tinymce']) || !is_array($args['tinymce']))
                    $args['tinymce'] = array();
            $args['tinymce']['paste_as_text'] = true;
            $args['tinymce']['file_browser_callback'] = 'function(field_id){hm_bbpui_file_upload(field_id);}';
            return $args;

    Why “Image Upload for BBPress” changes paste_as_text? The filter priority is higher than usual and it overrides “arguments” from other plugins.

    We can make the code snippet which will set true for paste_as_text. Are you expecting side effects if we apply it? Are you planning to fix it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello there

    Thanks for contacting us.

    Please follow these instructions:
    In your WordPress Dashboard, navigate to Tools >> Site Health.
    Click on the “Info” tab.
    Then click on the “Copy site info to clipboard” button
    Paste the copied information on your response message.
    See this demo:

    Thread Starter Saša


    We can’t share full “Site Health Info” because it contains some sensitive data. I left only important details for this issue:

    ### wp-core ###
    version: 5.7.2
    site_language: en_US
    user_language: en_US
    permalink: /%postname%/
    https_status: true
    multisite: false
    ### wp-dropins (3) ###
    advanced-cache.php: true
    db-error.php: true
    maintenance.php: true
    ### wp-active-theme ###
    name: GeneratePress Child (generatepress_child)
    parent_theme: GeneratePress (generatepress)
    ### wp-parent-theme ###
    name: GeneratePress (generatepress)
    version: 3.0.3
    author: Tom Usborne
    theme_path: /var/www/html/wp-content/themes/generatepress
    auto_update: Disabled
    ### wp-plugins-active ###
    Advanced Editor Tools (previously TinyMCE Advanced): version: 5.6.0, author: Automattic, Auto-updates disabled
    bbPress: version: 2.6.6, author: The bbPress Contributors, Auto-updates disabled
    Image Upload for BBPress: version: 1.1.18, author: Aspen Grove Studios, Auto-updates enabled
    ### wp-media ###
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1690
    imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101
    ### wp-server ###
    server_architecture: Linux 5.4.0-70-generic x86_64
    httpd_software: nginx/1.18.0
    php_version: 7.4.3 64bit
    php_sapi: fpm-fcgi
    ### wp-database ###
    extension: mysqli
    server_version: 10.3.29-MariaDB-0ubuntu0.20.04.1
    client_version: mysqlnd 7.4.3

    So, it doesn’t depend on the theme, WP core version or PHP version. We can reproduce it on fresh installation (latest plugins – bbPress and Advanced Editor Tools (previously TinyMCE Advanced) with Twenty Twenty-one theme).

    We’ve enabled Visual editor (TinyMCE) by bbPress instructions (Enable Visual Editor). There is used same hook in your plugin and bbPress snippets – bbp_after_get_the_content_parse_args.

    Without your plugin, “rich-text copy/paste” works. When we activate your plugin then the line 115 (bbp-image-upload.php) blocks this feature:
    $args['tinymce']['paste_as_text'] = true;

    Your code uses pretty high priority 9999 which overrides our defaults. You can see TinyMCE documentation for paste_as_text which your plugin forces to “true”. It’s obviously hard-coded into bbp-image-upload.php. We can “hack” it, but we’d like to hear from your developer why it’s needed and why prio 9999 is needed? It’ll be good to you fix it in the plugin’s code.

    Thank you for the detailed explanation! Your issue will be redirected to our developers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.