Text Editor through AJAX

Re: Text Editor through AJAX

by Conn Warwicker -
Number of replies: 0
Picture of Core developers Picture of Plugin developers

Fixed this in the end. The tinymce had set itself to initialised, so it was skipping the loading of the language files.


Had to put this in before the js call in the ajax:


        $editor = \editors_get_preferred_editor();

        $class = get_class($editor);

        $editorName = substr( $class, 0, strpos($class, '_') );

        $output .= "<script>M.editor_{$editorName}.initialised = false;</script>";