Create Textboxes

The Pressbooks textbox tool in the visual editor allows you to place text with frames to have it stand apart from the rest of the text in the body of your book. The structure and color of textboxes may vary from theme to theme.

Add Textboxes to Your Book

To add an empty textbox to your post from the visual editor, click on the Textboxes dropdown and select your desired textbox type. If you do this with a selection of text already highlighted, this text will be placed within the newly created textbox.

Pressbooks includes six preset textbox styles. Each of these also features a ‘sidebar’ variation which will display at 25% of the container width by default and was defined for PDF exports.

Preset textbox styles include the following:

Standard: This is a standard textbox.
Shaded: This is a shaded textbox.

Learning Objectives

This is a Learning Objectives textbox. Type your learning objectives here.

  • First
  • Second

Key Takeaways

This is a Key Takeaways textbox. Type your key takeaways here.

  • First
  • Second

Exercises

This is an Exercises textbox. Type your exercises here.

  • First
  • Second

Examples

This is an Examples textbox. Type your examples here.

  • First
  • Second

You can modify or edit the content within any of the textboxes. You can also insert a ‘custom’ textbox, which allows you to define a custom textbox class that you can target with Custom Styles.

Note: Standard and shaded textboxes were designed to include a single paragraph. If you’d like to include multiple line breaks within these textboxes, you can simply press “Shift+Enter” in the visual editor to create a ‘soft return’.

This will add line breaks without breaking the textbox (it’s what we did in this standard textbox, for example). If you feel confident in your ability to edit HTML tags, you can also switch to the Text Editor and edit a textbox’s <div> element directly.

Customize Your Textbox Colors

Each of the four textboxes designed for educational publishing projects have a preset color palette set by your book’s theme. Most themes include a Global Setting which allows you to globally change the color scheme for the textbox types. To change your textbox colors from their default palette:

  1. Click Appearance > Theme Options from the left-hand menu of your book’s dashboard and scroll down until you see customization options for Examples, Exercises, Key Takeaways, and Learning Objectives
  2. Click Select Color next to the element you’d like to change (Header Color, Header Background, or Background)
    You can select colors for the header color, header background, and background for each of these four textbox types.
  3. Use the resulting color picker to select your desired color. Click Default to return the element to its default color if needed.
    The graphic user interface that you can select your new color from.
  4. Repeat for each of the Header Colors, Header Backgrounds, and Background colors you want to modify.
  5. Click Save Changes

Any color customizations you apply will affect every textbox of that specified type in your book. For example, if you change the Key Takeaways Header Background to green, all of the Key Takeaways textboxes in your book will now have a green header background.

This change affects all export types. You can see the new, custom color textboxes in your visual editor.

License

Icon for the Creative Commons Attribution 4.0 International License

Palomar Pressbooks User Guide Copyright © 2024 by Pressbooks is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book