好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

给CKEditor换个皮肤 代码

<?php

/**

* Implements hook__wysiwyg_editor_settings_alter().

*/

function MODULENAME_wysiwyg_editor_settings_alter(&$settings, $context) {

global $base_url;

if ($context['profile']->editor == 'ckeditor') {

$skins_path = drupal_get_path('module', 'MODULENAME') . '/ckeditor/skins';

// For flexibility we use a variable to get the active skin name.

$active_skin = variable_get('MODULENAME_skin', 'silver');

// Set custom skin.

$settings['skin'] = sprintf('%s,' . '%s/%s/%s/', $active_skin, $base_url, $skins_path, $active_skin);

}

}

查看更多关于给CKEditor换个皮肤 代码的详细内容...

  阅读:41次