This is a theme component that will allow you to add scrollable sections in posts with one click!

Repository link
https://github.com/discourse/Scrollable-post-content

Preview:
https://theme-creator.discourse.org/theme/Johani/scrollable-post-content

After clicking “view theme” navigate to the “Scrollable post content” topic in the #General category


Samples

Desktop

scrollable1: 473x500, 75%

Mobile

org_t_scrollable-post-content_1126_preview_theme_id%3D1995_mobile_view%3D1(Nexus%206P): 242x500, 75%

Composer button

scrollable2: 690x471, 50%

Settings

This theme comes with two settings:

  1. Content height

    this allows you to set the desired height of the scrollable content in pixels. It defaults to 300. If you want to change it, just add a number, no need for units.

  2. Scrollable content button icon

    this allows you to set the icon used for the scrollable content button in the composer.

Translations

The component comes with one string that you can translate.

insert_scrollable_content: Insert scrollable content

This acts as the label for the composer button.

How do I use it?

There are two ways to add scrollable content.

  1. highlight the content you want to target, then click the button in the composer.
  2. click the composer button and start typing / paste content.

Either way works so it’s up to you.

How do I install this theme component?

Follow the theme installation guide and add the theme component to your active themes.

If you’re new to Discourse themes, you can learn more about them here.