You are here

function fckeditor_elements in FCKeditor - WYSIWYG HTML editor 5.2

Same name and namespace in other branches
  1. 5 fckeditor.module \fckeditor_elements()
  2. 6.2 fckeditor.module \fckeditor_elements()
  3. 6 fckeditor.module \fckeditor_elements()

Implementation of textarea Replace textarea with FCKeditor using callback function (fckeditor_process_textarea)

File

./fckeditor.module, line 146
FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben

Code

function fckeditor_elements() {
  $type = array();
  $type['textfield'] = array(
    '#process' => array(
      'fckeditor_process_input' => array(),
    ),
  );
  if (user_access('access fckeditor')) {

    // only roles with permission get the fckeditor
    if (fckeditor_is_compatible_client()) {

      // it would be useless to dig deeper if we're not able or allowed to
      $type['textarea'] = array(
        '#process' => array(
          'fckeditor_process_textarea' => array(),
        ),
      );
    }
  }
  return $type;
}