Daryl Wong
asked 5 years ago

Hi I have enable Add Media button for by setting media = true in editor.php

However when I try to upload the media when my role is author, I encounter an error saying that I do not have permission to attach file to this post.

May I know what else I need to do to enable this button to work for author role?

My site is here at eGallop.com.

Thx,

2 Answers
DominicStaff
answered 5 years ago

Currently, we have updated and released the latest version 1.4.1, you or subscriber can use Insert/Edit image button to upload a image to question, answer. We have remove the Add Media button in the latest version.
See the screenshot: http://prntscr.com/a49so2

Daryl Wong
answered 5 years ago

Is there a way to use only the visual editor and not the text editor?

In another word, how can I disable the text mode?

dominic Staff
replied 5 years ago

You can add the following code to the remove the Text Editor in ask question page and list question.

#question-content-html {
    display: none;
}

I’m not yet clear about your second question, I think you wanting disable text mode for your site. If it’s right, you can use the following code in the functions.php file:

function my_editor_settings($settings) {
$settings['quicktags'] = false;
return $settings;
}
add_filter('wp_editor_settings', 'my_editor_settings');

Or add the following code to the functions.php file

add_filter('quicktags_settings', 'cyb_quicktags_settings');
function cyb_quicktags_settings( $qtInit  ) {
    //Set to emtpy string, empty array or false won't work. It must be set to ","
    $qtInit['buttons'] = ',';
    return $qtInit;
}

If not, you can tell me detail about this issue, and send me your site for further checking.
Hope this helps !

daryl_wong
replied 5 years ago

Yes, exactly what I need! Thx.

Powered by DW Question & Answer Pro