diff --git a/lib/editor/tinymce/db/upgrade.php b/lib/editor/tinymce/db/upgrade.php index 7147da3f931..07570049a05 100644 --- a/lib/editor/tinymce/db/upgrade.php +++ b/lib/editor/tinymce/db/upgrade.php @@ -135,5 +135,17 @@ fontselect,fontsizeselect,wrap,code,search,replace,|,cleanup,removeformat,pastet upgrade_plugin_savepoint(true, 2013102900, 'editor', 'tinymce'); } + if ($oldversion < 2013110600) { + // Reset redesigned editor toolbar setting. + $currentorder = get_config('editor_tinymce', 'customtoolbar'); + // Start with a wrap. + // Remove the nonbreaking,charmap,table buttons (to be placed else where). + $neworder = str_replace(",wrap,nonbreaking,charmap,table", "", $currentorder); + // Place the nonbreaking,charmap,table button where they belongs. + $neworder = str_replace("search,replace", "search,replace,wrap,nonbreaking,charmap,table", $neworder); + set_config('customtoolbar', $neworder, 'editor_tinymce'); + upgrade_plugin_savepoint(true, 2013110600, 'editor', 'tinymce'); + } + return true; } diff --git a/lib/editor/tinymce/settings.php b/lib/editor/tinymce/settings.php index d5fd61465ee..b086d40c8fc 100644 --- a/lib/editor/tinymce/settings.php +++ b/lib/editor/tinymce/settings.php @@ -33,7 +33,7 @@ if ($ADMIN->fulltree) { $settings->add(new admin_setting_heading('tinymcegeneralheader', new lang_string('settings'), '')); $default = "wrap,formatselect,wrap,bold,italic,wrap,bullist,numlist,wrap,link,unlink,wrap,image -undo,redo,wrap,underline,strikethrough,sub,sup,wrap,justifyleft,justifycenter,justifyright,wrap,outdent,indent,wrap,forecolor,backcolor,wrap,ltr,rtl,wrap +undo,redo,wrap,underline,strikethrough,sub,sup,wrap,justifyleft,justifycenter,justifyright,wrap,outdent,indent,wrap,forecolor,backcolor,wrap,ltr,rtl fontselect,fontsizeselect,wrap,code,search,replace,wrap,nonbreaking,charmap,table,wrap,cleanup,removeformat,pastetext,pasteword,wrap,fullscreen"; $settings->add(new admin_setting_configtextarea('editor_tinymce/customtoolbar', diff --git a/lib/editor/tinymce/version.php b/lib/editor/tinymce/version.php index 0ea7cbd0700..72fc96de122 100644 --- a/lib/editor/tinymce/version.php +++ b/lib/editor/tinymce/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2013110500; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2013110600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2013110500; // Requires this Moodle version $plugin->component = 'editor_tinymce'; // Full name of the plugin (used for diagnostics) $plugin->release = '3.5.8'; // This is NOT a directory name, see lib.php if you need to know where is the editor code!