Skip to content

Commit

Permalink
MDL-42660 TinyMCE: Shuffle icons in default toolbar layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnfwlr authored and Damyon Wiese committed Nov 7, 2013
1 parent f2b8eb2 commit 2106d4b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions lib/editor/tinymce/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,17 @@ function xmldb_editor_tinymce_upgrade($oldversion) {
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;
}
2 changes: 1 addition & 1 deletion lib/editor/tinymce/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$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',
Expand Down
2 changes: 1 addition & 1 deletion lib/editor/tinymce/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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!

0 comments on commit 2106d4b

Please sign in to comment.