You are here

editor.plugins.types.inc in Editor 6

Provides default plugin type objects. @author Tj Holowaychuk <http://www.350designs.com/> @package Editor

File

editor.plugins.types.inc
View source
<?php

/**
 * @file 
 * Provides default plugin type objects.
 * @author Tj Holowaychuk <http://www.350designs.com/>
 * @package Editor
 */

/**
 * Default plugin types.
 */
function editor_editor_plugin_types() {
  $plugin_types = array();
  $plugin_types[] = editor_plugin_type_create('button', t('Button'), 'editor_button', t('A simple button.'));
  $plugin_types[] = editor_plugin_type_create('hidden', t('Hidden'), '', t('A hidden plugin which can be used as even listeners etc.'));
  return $plugin_types;
}

/**
 * Theme a button plugin type.
 * 
 * @param object $plugin
 * 
 * @return string
 *   Markup.
 */
function theme_editor_button($plugin) {
  return '
      <div id="editor-' . $plugin->pid . '" class="editor-plugin editor-button">
        <div class="editor-button-left"></div>
        <div class="editor-button-content"></div>
        <div class="editor-button-right"></div>
      </div>
    ';
}

Functions

Namesort descending Description
editor_editor_plugin_types Default plugin types.
theme_editor_button Theme a button plugin type.