Module descriptions and text added using the rich text editor can be collapsed with the Read More class
Easily add a Read More link to your texts to collapse longer texts and allow your users to expand to see the rest of the text on click.
All you have to do is add a span class in the HTML to enclose all of the text you want to be collapsed.
Follow the steps to edit code in the rich text editor to access the source code, then add the span class to the text you want to be collapsed:
<span class="pwr-read-more">Futher text to display after clicking on Read More</span>
If you have two paragraphs in a module description and you want the first paragraph to display, but the second paragraph to be collapsed, it would look like this:
This is the text for the first paragraph, it's long, but not too long.
<span class="pwr-read-more">This is the text for the second paragraph,
it is likely much longer than the text for the first paragraph and probably
goes quite a bit longer than this example.</span>
You can also add breaks in the text by using the line break HTML tag:
This is the text for the first paragraph, it's long, but not too long.
<span class="pwr-read-more">This is the text for the second paragraph,
it is likely much longer than the text for the first paragraph and probably
goes quite a bit longer than this example.<br><br>Adding breaks in a module is
easy with line breaks, one will move the text to the next line and two will
create a break similar to a new paragraph </span>
Module descriptions don't typically include paragraph tags since the style is applied from the theme settings, using the span class is the best way to configure for module content (i.e. descriptions for steps)
You can also use the span class in any rich text editor to separate two paragraphs:
<p>This is the text for the first paragraph, it's long, but not too long.</p>
<p> <span class="pwr-read-more">This is the text for the second paragraph,
it is likely much longer than the text for the first paragraph and probably
goes quite a bit longer than this example.</span></p>
If you have longer texts and need multiple paragraphs, you can use a div class instead of the span class. The div class will let you add as much formatting as you need in the rich text editor:
<p>Sometimes you have a lot to say, but maybe you don't want your description
to look like a novel. Wouldn't it be nice to collapse the extra text into a link
that your users could click if they want to keep reading?</p>
<div class="pwr-read-more">
<p>See, it's nice, right?</p> <p>This handy little link was created with a simple
HTML class.</p>
<p>I know what you're thinking, this theme is supposed to be "no code" and we've done
everything we can to keep it that way, but sometimes, when you want a really cool
feature like this, you have to dip your toes into the source code editor to add a tiny
little CSS class.</p>
</div>