Limit Editor Features in Q&A

How can I control/limit the editor features for visitors and users? Your detail page for the plugin shows the editor with only a dozen or so options...I'm using Advanced TinyMCE and most options are displayed even for unregistered visitor. If there is a global control I missed it...

  • Kimberly
    • Champion of Loops

    Hi there Zeke!

    The control user level permissions you can visit the Dashboard>Questions>Settings and check out the drop-down. You select which role you want to edit then select the checkboxes below accordingly, don't forget to save your settings!

    Please let me know if you need anything else or if I missed the boat on this!

    Best,

    Kimberly

    If the above action did not result in the resolution or common end to this ticket then please feel free to come back here for comment. Just be sure you mark "Not Resolved" to re-open or we might miss it! :slight_smile: Thanks!

  • Hakan
    • The Incredible Smush

    Hi KimberlyL,

    I think Zeke is mentioning about customization of wp-editor of the question form, removing some icons, buttons, etc.

    Is that right Zeke?

    Currently there is no option for customizing wp-editor of the question form at all.

    But in the next version there will be a WP filter with which you can control the look of the editor depending on user level.

    Cheers,
    Hakan

  • Hakan
    • The Incredible Smush

    Hi Zeke,

    New version is being tested now. It doesn't take long.

    There are filters for question and answer forms and they can be used to customize tinyMCE depending on user and/or question. Here is an example:

    // Use different functions if you want to modify question and answer editors differently
    add_filter( 'qa_question_editor_settings', 'my_modify_editor_function', 10, 2 );
    add_filter( 'qa_answer_editor_settings', 'my_modify_editor_function', 10, 2 );
    function my_modify_editor_function( $settings, $ID ) {
    	// Dont use visual editor for visitors
    	if ( !is_user_logged_in() ) {
    		$tinymce = false;
    	}
    	// Add some tinyMCE plugins and buttons for admins. Don't forget to check if they work in your theme.
    	else if ( current_user_can( 'manage_options' ) ) {
    		$tinymce['plugins']='inlinepopups,tabfocus,paste,media,fullscreen';
    		$tinymce['theme_advanced_buttons2']='pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo';
    	}
    	// Use minimal editor for other roles
    	else {
    		$tinymce['teeny'] = true;
    	}
    	// Make something special for question #1 and answer #1
    	if ( 1 == $ID )
    		$tinymce['theme_advanced_buttons1']='formatselect,forecolor,|,bold,italic,underline';
    
    	$settings['tinymce'] = $tinymce;
    
    	return $settings;
    }

    In addition to your link please also see this:
    http://codex.wordpress.org/Function_Reference/wp_editor

    Cheers,
    Hakan

  • Zeke
    • Site Builder, Child of Zeus

    That's great news and thanks for the filter examples...but if the new release is likely a matter of days or a week, that will work for this project...if not, which of the qa files can the filters be used...qa/core/answers...?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.