Rich Text Excerpts
==================

A Wordpress plugin which swaps out the textarea used for excerpts with a TinyMCE editor instance.

Description
-----------

The Plugin uses the [wp_editor](http://codex.wordpress.org/Function_Reference/wp_editor) function to generate a rich text editor for page/post excerpts, so **will only work in Wordpress 3.3 or greater**.

The plugin utilises three action hooks:

* [add_meta_boxes](http://adambrown.info/p/wp_hooks/hook/add_meta_boxes) is used to remove the excerpt meta box generated by Wordpress, and add the new excerpt editor metabox.
* [edit_form_advanced](http://adambrsown.info/p/wp_hooks/hook/edit_form_advanced) and [edit_page_form](http://adambrown.info/p/wp_hooks/hook/edit_page_form) are used to add the excerpt editor to posts and pages when a metabox is not used.

**Note:** the new editing box can either be placed in a sortable, draggable box or in a static position on the editing screen. By default, the former is used, but if you experience problems, try switching to the static approach. The issue with using TinyMCE in sortables is documented here:

http://core.trac.wordpress.org/ticket/19173

The editing box for excerpts uses [wp_editor](http://codex.wordpress.org/Function_Reference/wp_editor) to create a rich text editor. You can set the options for the rich text editor in the plugin options page (in the Wordpress  Settings menu).

The plugin also contains two filters which act on the "teeny" MCE editor instance which is used by default. The plugins and buttons used by the minimal editor can also be customised on the plugin options page. 

Installation
------------

1. Upload the plugin to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Configure the plugin using the Plugin options page under the Settings menu

If you want to use excerpts in pages, add this to your theme's `functions.php` file:

`add_post_type_support('pages', 'excerpt');`

See [add_post_type_support](add_post_type_support) in the Codex for details.
 
If you want to use excerpts in Custom Post Types, do it when you create them using the `supports` array in the arguments for [register_post_type](http://codex.wordpress.org/Function_Reference/register_post_type).

Changelog
---------

### 1.3.1
* added extra CSS styles to the editor, incorporated from [this forum post](http://wordpress.org/support/topic/better-look-with-a-few-extra-lines-of-code)
* re-built translations to reflect new admin options, and incorporated the changes suggested by Johan Pirlouit in [this forum post](http://wordpress.org/support/topic/french-translation-updated-and-a-few-other-minor-things-fixed)
* started to use `wp_kses_decode_entities` in addition to `html_entity_decode` on content before it is displayed in the editor to stop the behaviour described in [this forum post](http://wordpress.org/support/topic/special-characters-show-as-their-character-codes)

### 1.3
* made register_plugin_options() static (bugfix)
* added option to use a metabox instead of placing the excerpt statically using edit_form_advanced or edit_page_form.

### 1.2.1
* removed a debugging setting from the plugin which set the `textarea_rows` to 20. Setting `textarea_rows` in `wp_editor()` doesn't appear to have any effect anyway
* tidied up javascript and added error checking for selection of post types
* additional error checking in the validation routine

### 1.2
* Added translations (no idea whether these work though!)
* Fixed some bugs in plugin options saving/retrieval
* Fixed post type support
* Put the editor in a container (suggestion from Chris Van Patten)
* changed screenshot

### 1.1
* Addition of plugin options page to Wordpress Admin area, giving users the ability to configure the operation of the plugin
* Fixed minor bug relating to editor display which was triggered in some circumstances

### 1.0
* Wordpress submission after initial development on bitbucket.

Translations
------------

The plugin has been translated (using [Google translate](http://translate.google.com/)) into the following languages:

Afrikaans (af), Albanian (al), Arabic (ar), Basque (eu), Belarusian (be_BY), Bulgarian (bg_BG), Bosnian (bs_BA), Catalan (ca), Chinese (zh_CN), Croatian (hr), Czech (cs_CZ), Danish (da_DK), Dutch (nl_NL), Esperanto (eo), Estonian (et), Finnish (fi), French (fr_FR), Gaeilge (ga), Galician (gl_ES), Georgian (ge_GE), German (de_DE), Greek (el_GR), Hebrew (he_IL), Hindi (hi_IN), Hungarian (hu_HU), Icelandic (is_IS), Indonesian (id_ID), Italian (it_IT), Japanese (ja), Javanese (jv_JV), Kannada (kn_IN), Khmer (km_KH), Korean (ko_KR), Lao (lo), Latvian (lv), Lithuanian (lt_LT), Macedonian (mk_MK), Malay (ms_MY), Norwegian (nb_NO), Persian (fa_IR), Polish (pl_PL), Portuguese (pt_PT), Romanian (ro_RO), Russian (ru_RU), Serbian (sr_RS), Slovak (sk_SK), Slovenian (sl_SI), Spanish (es_ES), Swedish (sv_SE), Tamil (ta_LK), Thai (th), Turkish (tr), Ukranian (uk), Urdu (ur), Vietnamese (vi), Welsh (cy).

If you can trnaslate the plugin into another language not listed here, or if you use any of these languages and can check them, please feed back in either the wordpress support forum or on github.

https://github.com/bjorsq/rich-text-excerpts

I am using some tools (in the tools subdirectory in languages) to generate these files automatically.

Contribute
----------

Please contribute to the development of this plugin by using it and reporting issues via the Wordpress plugins forum. If you are using it successfully, please post a review and rate the plugin.

If you can translate this plugin, please get in touch - there is a POT file with the plugin for translators to use. I've made translations using Google translate, but not sure if these are any good - any edits on thes to improve them are welcome.
