Forum breadcrumbs – You are here:Asgaros Support ForumSupportText mode in editor?
Please or Register to create posts and topics.

Text mode in editor?

Hi,

I have a lot of advanced users who already use Wordpress and would like to be able to edit their code directly, just as you can with the “Text” tab in the editor for posting. Is there a way to get that functionality in asgaros? It’s basically the only thing keeping me from switching from wp-foro at the moment.

Hi DavidGriswoldH,

you have to add to your themes functions.php:

function change_editor_settings($settings) {
  if (is_super_admin()) {
    $settings['teeny'] = false;
    $settings['quicktags'] = true;
        return $settings;
  }
}
add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');

 

Thank you! Between that and adding the “Advanced MCE” plugin, this is now by far the most feature-rich forum editor I’ve found without all the difficulty of bbPress.

Quote from Yworld on August 1, 2017, 10:14 pm

Hi DavidGriswoldH,

you have to add to your themes functions.php:

function change_editor_settings($settings) {
  if (is_super_admin()) {
    $settings['teeny'] = false;
    $settings['quicktags'] = true;
        return $settings;
  }
}
add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');
  1. function change_editor_settings($settings) {
  2. if (is_super_admin()) {
  3. $settings[‘teeny’] = false;
  4. $settings[‘quicktags’] = true;
  5. return $settings;
  6. }
  7. }
  8. add_filter(‘asgarosforum_filter_editor_settings’, ‘change_editor_settings’);
function change_editor_settings($settings) {
  if (is_super_admin()) {
    $settings['teeny'] = false;
    $settings['quicktags'] = true;
        return $settings;
  }
}
add_filter('asgarosforum_filter_editor_settings', 'change_editor_settings');

 

Thanks for the info. To clarify, this code goes into the functions.php file of my main site theme or a asgaros specific custom theme?

Also the formatting bar in my installation looks different from the one here, I can’t change the style preset. Here’s a screenshot. Any idea what’s causing this?

In the theme of the site.

Thanks!

Also the formatting bar in my installation looks different from the one here, I can’t change the style preset. Here’s a screenshot. Any idea what’s causing this?

Unchecking the “Use minimalistic editor”-checkbox in the options should solve this! 🙂

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

@Yworld ‘s code works fine. But one silly beginners question – will the functions.php change be gone after the next theme update?

Hello @yellowfish

Yes, theme-updates usually replaces your functions.php file so a backup is necessary.

As an alternative you can create a custom plugin-file which contains your code-snippets. In this case all your snippets are independent of other plugins or themes. You can check out this website for more information:

How To Create A Custom WordPress Plugin (And When To Use It Over Functions.php)

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!