We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • discuss.answer
    • 8168
    • 1,118 Posts
    SORTED. Thanks BBloke - searching the input field name worked a charm.

    So... to manually set the RTE editor,

    Within the mutate_content.dynamic.php in the "manager/actions" folder - look on line 1197 and amend the line:

    'editor' => $which_editor,


    To become:

    'editor' => 'The_Name_of_your_hardcoded_RTE',


    so, in my case manually setting it to 'TinyMCE4' meant I made it read:

    'editor' => 'TinyMCE4',


    Save and bang - default RTE is set hardcoded.

    To get the value name of your RTE - again use firebug to inspect the Manager element of the <option> element where the RTE options are listed - you can then hard code as above.

    dubbs.
      • 36649
      • 77 Posts
      Hello,

      this does not work in Evo 1.2 it seems. I changed on line 148 of mutate_content_dynamic.php

      if (isset ($_POST['which_editor'])) {
         // $modx->config['which_editor'] = $_POST['which_editor'];
      $modx->config['which_editor'] = 'TinyMCE4';
      }


      but this does not help.

      I also changed one line on 1223:
       $evtOut = $modx->invokeEvent('OnRichTextEditorInit', array(
                         // 'editor' => $editor,
      'editor' => 'TinyMCE4',
                          'elements' => $elements,
                          'options' => $richtexteditorOptions[$editor]
                      ));


      but with no result.

      As of now, the RTE has o be set every time a document is edited. It does not save the setting when saving the document.

      Thanks for any hint to solve this!