Rich Text Excerpts

Omschrijving

The Plugin uses the 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 is used to remove the excerpt meta box generated by WordPress, and add the new excerpt editor metabox.
  • edit_form_advanced and 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 (using the plugin options page in the Settings menu). The issue with using TinyMCE in sortables is documented here:

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

The editing box for excerpts uses 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.

Draag bij

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.

I’m maintaining this plugin on Github:

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

If you would like to make any improvements to the codebase or to translations, please do so by forking it and issuing a pull request when you have made the changes.

All releases are tagged on github, and eventually find their way into the WordPress Plugin Directory.

Vertalingen

If you can translate this plugin, or improve on the existing translations (most of which were made using Google translate), please get in touch either through the WordPress support forum or via GitHub.

Many thanks to alcoholdenat for an updated Polish translation (in the 1.3.2 release).

Available 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).

Schermafdrukken

  1. rich-text-excerpts screenshot 1

    A screenshot showing the rich text editor in a post excerpt

Installatie

  1. Upload the plugin to the /wp-content/plugins/ directory
  2. Activeer de plugin via het ‘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('page', 'excerpt');

See 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.

FAQ

Installation Instructions
  1. Upload the plugin to the /wp-content/plugins/ directory
  2. Activeer de plugin via het ‘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('page', 'excerpt');

See 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.

I activated the plugin, but the rich text editor isn’t working for [pages|custom post types] – why?

This plugin has a settings page where you can configure which post types use a rich text editor for their excerpts – by default only posts will use the rich text editor. The post types displayed on the settings page are only those which support excerpts, so if you don’t see your post type here, it doesn’t support manual excerpts.

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

add_post_type_support('page', 'excerpt');

See 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, or use a plugin like Types.

My excerpts don’t appear on my site with the formatting I apply using the editor – why?

This plugin only adds the ability to edit excerpts in the WordPress admin area using a Rich Text editor. How these excerpts are displayed on your site, or whether they are displayed at all, is the responsibility of the theme you are using.

Most themes will use the ‘correct’ way of displaying hand-crafted excerpts, which is to call get_the_excerpt() outside the wordpress ‘loop’, or the_excerpt() inside the loop. However, there are other wordpress functons which can be used to get excerpts, such as wp_trim_excerpt(), which will generate an excerpt from the post content rather than using the excerpt field. Themes could also remove all formatting and shortcodes from excerpts.

My excerpts contain shortcodes, but they aren’t showing up on my site – why?

Again, the way excerpts are displayed on your site, or whether they are displayed at all, is the responsibility of the theme you are using (and not this plugin).

If you have access to the theme files, there are a number of ways you can process shortcodes in excerpts, depending on the method used to display them in the theme. For instance, if the excerpt is added to pages/posts using the_excerpt(), you could change this to echo do_shortcode(get_the_excerpt()). Another approach would be to try the techniques outlined here:

using shortcodes everywhere

I’m using another plugin which alters excertps in the WordPress Admin area, and this plugin disables these features – can this be fixed?

Other plugins which enhance the excerpt editor in some way will probably have issues with this plugin, as it removes and re-adds the excerpt editor meta box. The best solution would be to encourage the developers of the other plugin to utilise a rich text editor in their plugin (it isn’t hard!).

Beoordelingen

Excelente

La traducción es muy mala, cuando tenga tiempo voy a ayudar con esto, pero decir que he estado buscando por horas un plugin que me permita hacer esto… Me ha salvado.

5 entrellas!

Just Wonderfull !

Great plugin, we are using it in all our blogs since long ago and can just recommend it! It does the job and it´s very professional. Plus, great support!

Lees alle 22 beoordelingen

Bijdragers & ontwikkelaars

“Rich Text Excerpts” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

“Rich Text Excerpts” is vertaald in 53 talen. Dank voor de vertalers voor hun bijdragen.

Vertaal “Rich Text Excerpts” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

1.3.3

  • Incorporated some of the suggestions in this forum post about the padding around the editor
  • Bumped “Tested up to” value to WordPress 4.4.

1.3.2

  • Updated Polish translation thanks to alcoholdenat.
  • Updated main plugin files to make them follow the WordPress Coding standards.
  • Added Grunt build for language file compilation (git repo only).
  • Bumped “Tested up to” value to WordPress 4.0 and updated screnshot.
  • Split javascript into two files and changed javascript and css inclusion strategy in response to this forum post.
  • Added an option to set the height of the editor.

1.3.1

  • added extra CSS styles to the editor, incorporated from this forum post.
  • re-built translations to reflect new admin options, and incorporated the changes suggested by Johan Pirlouit in this forum post.
  • 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.

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.