You are here

function ckeditor_update_7001 in CKEditor - WYSIWYG HTML editor 7

Removes the 'DrupalBreak' button from the 'Advanced' profile. (Resets toolbar to default)

File

./ckeditor.install, line 459

Code

function ckeditor_update_7001() {
  $result = db_query("SELECT settings FROM {ckeditor_settings} WHERE name = :name", array(
    ':name' => 'Advanced',
  ))
    ->fetchField();
  $settings = unserialize($result);
  $settings['toolbar'] = "\n[\n    ['Source'],\n    ['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],\n    ['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],\n    ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],\n    ['Maximize', 'ShowBlocks'],\n    '/',\n    ['Format'],\n    ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],\n    ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],\n    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],\n    ['Link','Unlink','Anchor']\n]\n    ";
  $settings = serialize($settings);
  $update = db_update('ckeditor_settings')
    ->fields(array(
    'settings' => $settings,
  ))
    ->condition('name', 'Advanced', '=')
    ->execute();
}