1.20.x filter.module filter_get_editors()

Returns a list of text editors that are used with 'text_format' elements.

File

modules/filter/filter.module, line 850
Framework for handling the filtering of content.

Code

function filter_get_editors() {
  $editors = &backdrop_static(__FUNCTION__, NULL);

  if (!isset($editors)) {
    $editors = array();
    $modules = module_implements('editor_info');
    foreach ($modules as $module) {
      $module_editors = module_invoke($module, 'editor_info');
      foreach ($module_editors as $editor_name => $editor) {
        $editor['module'] = $module;
        $editors[$editor_name] = $editor;
      }
    }
    backdrop_alter('editor_info', $editors);
  }

  return $editors;
}