WordPress Plugin: Text Expander

Meine SoftwareSometimes you may want to add information to your blogposts, which aren’t that essential. For example the version-history of all my tools is cool, but may only be interesting for a few users. Website-elements which are collapsable help avoiding visual noise these days and give control to the user, what they want to see. Dagon Design developed a WordPress-Plugin called “Expanding Text” which enables a blogger to make any part of a post collapsable. I wasn’t entirely convinced with it, so I forked my own plugin.

Improvements compared to Expanding Text

  • A double-arrow is shown next to the expand-link, which indicates whether the part is collapsed or expanded next
  • the expand-part will expand via a jQuery-animation. This looks a lot better, than having the text just appear all of the sudden.

Download

in WordPress’ Plugin Directory or

Wordpress Text Expander 0.3 (6.71 kB) - 657 hits

Usage

Make sure to leave the space after the first bracket out!

[EXPAND Click to expand!]

This is our beautiful text.

[/EXPAND]

That’s how it will look:

This is our beautiful text.

Customization

You can style the expanded section to your needs by assigning attributes to the class .te_div in your design’s CSS-file.

e.g. with a thick border:

.te_div {

border: 4px solid #DDDDDD;

}

Feel free to tell me in the comments or my think-tank if you got ideas for further imrprovements!

Related Posts

  • sudheer

    Hi,
    The plugin is wonderful and very useful.. But can you please help me a
    bit as i was not able to implement this on tabs (quick tabs plugin). its
    working perfectly from pages. but not sure what is wrong inside the tabs
    (created using “quick tabs” plugin)., when i use the [EXPAND Klicken zum Vergrößern!]Das ist der Text[/EXPAND] its simply displays it as text.
    Your help will be highly appreciated.
    Thank you
    Regards,

    Sudheer

  • Bink

    Thanks for the great plugin Hedgehog!

    For folk having problems with the first item having an extra large space after it, I resolved this problem by placing all content to be expanded within a single .For example:[EXPAND item1]guh[/EXPAND]
    [EXPAND item2]meh[/EXPAND] 
    [EXPAND item3]fwah[/EXPAND]

    Oddly, I only had this problem on one page and no amount of messing around with content or checking for line breaks and white space seemed to help.

  • Koroz

    Really perfect plugin. Thank you!

  • Chris

    Hi Alexander,

    First of all, thank you very much for the plugin. It’s of great use. Could you please tell me (and other readers) what to do so that the plugin won’t automatically insert a new paragraph after the text to be expanded? For example, here: http://www.santinela.info/journal-for-communication-and-culture/2/ I’d like to have [Full Text] right after the [Abstract], but the plugin inserts a new paragraph between the two.

    Also, I’m an amateur DJ, any feedback concerning my mixing is welcome on behalf of a fellow DJ such as yourself! :) http://soundcloud.com/djlittlebrother/february-2010-mix

    Thanks!

    • Chris

      Any reply from anyone is appreciated!

  • Liat Gat

    Hi, great plugin! Just one problem – I’m getting a big space between the first expand link in my list and the rest of them. Here is an example: http://aspenskiphotography.com/video-testing-2.

    Can you help?

    • Antonio

      I can’t see your example at all (no link I guess). But I had a similar problem, and it was caused by spaces/lines before the text inside the expand and before the [ expand ].

      Maybe if I see your example and your full text I can be more specific.
      :)

  • Marcin Lewandowski

    Hello!
    How can I set the arrow after the expanding link, and add a horizontal line at width ex. 650px under the title??

    • http://www.ali.dj Hedgehog

      You can adjust the arrows in “Settings -> Text Expander” in the admin panel.
      You’d add a horizontal line by adding 

      .te_div { 
         padding-bottom:650px;
         border-bottom: 1px solid #000;
      }

      to your css-file. I’m not sure though whether I got right what you are trying to do here.

    • Marcin Lewandowski

      This line is under content not under title :(

  • Antonio

    Hi. Is it possible gaving multiple instances of this plugin (for different configurations in CSS of te_div)

    Thank you

    • http://www.ali.dj Hedgehog

      Not currently, but it is a very good idea to add this in the next version. I already have an idea how to accomplish this.

  • Kaspar

    Hello!
    How can I set the arrow after the expanding link?

  • Sonny

    Hello.
    This is amazing plugin! But I have a problem – text format disappears. No paragraphs, markers etc.  Is there any solution?
    Thanks in advance.

    • http://www.ali.dj Hedgehog

      Could you setup an example-page where I can see this problem in action?

    • Sonny

      Yes, you can see it here:  http://dem-s.com/?page_id=19

    • Sonny

      Thank you! It works when I edit text in wp visual editor. Unfortunately doesn’t support copy/paste from ms word. But already is really better, thanks.

    • http://www.ali.dj Hedgehog

      Sorry I don’t understand the problem.
      There is a “paste from word” function in the WordPress’ editor.
      Just look at the picture I attached.

  • http://minus21grams.net -21grams

    Is there any way we could get this to work in comments too?
    [using WP v3.2.1]

    • http://www.ali.dj Hedgehog

      Why would you want to use it in the comments? The only person who’d know about it are your authors?