BuddyDev

Search

Add rich editor as tiny MCE on post form buddypress

  • Participant
    Level: Initiated
    Posts: 19
    doog2229 on #44976

    Hi,

    For other customer, i use a rich editor as tiny MCE on post form buddypress. I created an override of post-form.php of buddypress for added tiny MCE

    but with mediapress this customisations doesn’t works. The upload process of the media works better with native post form buddypress

    Is it possible to add tiny MCE programmatically (hook or filter) in post form buddypress with your plugin ?

    Do you plan to add this functionality in the future?

    Thanks so lot

  • Keymaster
    (BuddyDev Team)
    Posts: 24611
    Brajesh Singh on #44987

    Hi,
    If you are using our WordPress.org version, we have following code that is used to latch over to the ajax posting and sending our uploaded media ids.

    
        //filter ajax request but only if the activity post form is present
        if (jq('#whats-new-form').get(0) || jq('#swa-whats-new-form').get(0)) {
    
            jQuery(document).ajaxSend(function (event, jqxhr, settings) {
    
                if (is_post_update(settings.data)) {
                    var attached_media = mpp_get_attached_media();
    
                    if (attached_media) {
                        settings.data = settings.data + '&mpp-attached-media=' + attached_media;
                        mpp_reset_attached_media();
                    }
                }
            });
    
            jq(document).ajaxComplete(function (evt, xhr, options) {
    
                var action = get_var_in_query('action', options.data);
    
                //switch
                switch (action) {
    
                    case 'post_update':
                    case 'swa_post_update':
                        hideActivityUploadContainer();
                        mpp.activity_uploader.hide_ui(); //clear the list of uploaded media
                        jq('.mpp-remote-add-media-row-activity').hide();
                        break;
                }
    
            });
    
        }
    

    It seems to me that when you are enabling the rich text editor, the code does not get attached.
    If possible, Please investigate it.

    If you are using the plugin from github, Please let me know. we have a bit different code there.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved