Adding and Editing Content in Strapi, Step-by-Step

Aarya Panse

Blog / Adding and Editing Content in Strapi, Step-by-Step

Adding and editing content in Strapi CMS involves a structured process that combines content creation, management, and publishing workflows. Let us go through each step to understand the process of content addition and editing.

Accessing the Content Manager

To begin working with content in Strapi, you'll first need to access the Content Manager. Here's how:

  1. Open your web browser and navigate to your Strapi admin panel (typically `your-domain/admin`)
  2. Log in using your administrator credentials
  3. Once logged in, locate and click on "Content Manager" in the left sidebar menu

The Content Manager interface consists of three main areas:

  • Left sidebar: Contains your collection types and single types
  • Main content area: Displays your content entries or editing interface
  • Top navigation bar: Houses important actions like Save, Publish, and Settings

Creating New Content

To create new content in Strapi:

  1. Select your desired collection type from the left sidebar
  2. Click the "Create new entry" button in the top right corner
  3. You'll be presented with a form containing all available fields for that content type

Understanding Fields

Fields in Strapi come in two categories:

  • Required fields (marked with an asterisk *)
  • Optional fields (can be left empty)

Before adding content, familiarize yourself with the basic field types:

  • Text fields for written content
  • Media fields for images and files
  • Relational fields for connecting different content types
  • Special fields for specific data types (numbers, dates, etc.)

Working with Different Field Types

Text Fields

Strapi offers several text input options:

  1. Standard Text Input
  • Single-line text fields are ideal for concise content like titles, names, or brief descriptions.
  • These fields limit input to one line and are perfect for content that needs to be short and focused.
  • Multi-line text fields provide more space for detailed content such as paragraphs, descriptions, or any text that requires multiple lines.
  • These fields automatically expand as you type, giving you the flexibility to write longer content without space constraints.
  1. Rich Text Editor (CKEditor)
  • The formatting toolbar offers essential text styling options including bold, italic, and underline.
  • You can quickly highlight important information or add emphasis to specific text sections without knowing HTML.
  • You can embed images, create hyperlinks to external sources, and organize content with bulleted or numbered lists, all through an intuitive interface.
  • Create well-structured content using different heading levels (H1 to H6).
  1. Markdown Editor
  • Write content using Markdown syntax, a lightweight markup language that converts plain text to formatted HTML.
  • The live preview feature shows you exactly how your content will appear while you write. This split-screen view helps ensure your formatting appears as intended without switching between edit and preview modes.
  • You can toggle between the Markdown editing mode and preview mode with a single click.

Media Fields

To work with media:

  1. Uploading New Media
  • Click the media field or drag and drop files
  • Select files from your computer
  • Wait for upload completion
  1. Media Library Selection
  • Browse existing media
  • Filter by type (images, videos, documents)
  • Select multiple items if allowed

Special Fields

Special fields require specific input formats:

  1. Numbers: Enter numerical values only
  2. Dates: Use the date picker or type in YYYY-MM-DD format
  3. Boolean: Toggle between True/False
  4. Email: Enter valid email addresses
  5. Password: Input sensitive information securely
  6. UID: Unique identifiers (auto-generated or custom)

Working with Components

Components in Strapi are reusable content structures that help organize and manage complex content types efficiently.

They allow you to create modular content blocks that can be used across different content types, ensuring consistency and reducing redundancy in your content management workflow.

Non-repeatable Components

Single-use content blocks for consistent sections. Ideal for unique information that appears once per entry.

  1. Adding Components
  • Navigate to your contest entry
  • Locate the component field in your content type
  • Click the "Add Component" button to initialize the component
  • The component fields will appear, ready for content input
  1. Filling Component Fields
  • Complete all required fields marked with an asterisk (*)
  • Add content to optional fields as needed
  • Each field within the component functions like standard Strapi fields
  • Preview your content to ensure proper formatting
  1. Saving Component Changes
  • Click the "Save" button to preserve your component content
  • All component changes are saved along with the main content entry
  • Review the saved component to verify all information is correct
  • Make additional edits if necessary
  1. Managing Components
  • Use the trash icon in the top-right corner to remove unwanted components
  • Removed components can't be recovered, so delete with caution
  • Consider unpublishing content instead of deleting if you might need it later
  • Components can be edited at any time by clicking on their fields

Repeatable Components

Reusable content structures that can be added multiple times. Perfect for recurring, uniformly formatted information.

  1. Creating Multiple Instances
  • Click "Add New Entry" to create additional component instances
  • Each instance contains the same field structure
  • Fill out each instance with unique content
  • Add as many instances as needed within the allowed limit
  1. Managing Component Order
  • Use the drag handles (six dots icon) to grab components
  • Drag components up or down to change their order
  • The order of components affects how they appear in your content
  • Changes in order are saved automatically
  1. Component Management
  • Delete individual instances using the trash icon
  • Edit any instance by clicking its fields
  • Add new instances between existing ones
  • Collapse instances to better manage long lists

Dynamic Zones

Flexible areas combining various component types. Allows for custom layouts with mixed content structures.

  1. Adding Components
  • Click "Add Component to Dynamic Zone"
  • Select from available component types in the popup menu
  • Choose components that best fit your content needs
  • Mix different component types within the same dynamic zone
  1. Organizing Content
  • Arrange components in a logical content flow
  • Combine different component types to create rich content layouts
  • Add spacing and structure to your content
  • Consider the visual hierarchy when organizing components
  1. Component Editing
  • Click into any component to modify its content
  • Each component maintains its unique field structure
  • Save changes within individual components
  • Preview how components work together
  1. Content Arrangement
  • Use drag and drop to reposition components
  • Adjust the order to create better content flow
  • Move components between different sections of your dynamic zone
  • Reorganize content without losing any data

Content Management Features

Draft & Publish System

Strapi's publishing workflow:

  1. Save as draft while working
  2. Publish when ready for public view
  3. Unpublish to remove from public access
  4. Revert to draft for major changes

Bulk Operations

Manage multiple entries efficiently:

  1. Select entries using checkboxes
  2. Choose bulk actions (delete, publish, unpublish)
  3. Confirm actions when prompted

Content Organization

Keep your content organized:

  1. Use search to find specific entries
  2. Apply filters for better content management
  3. Customize list views for efficiency
  4. Duplicate entries to save time

Best Practices

Follow these tips for optimal content management:

  • Create consistent naming conventions
  • Use drafts for work in progress
  • Regular content audits and updates
  • Back up important content regularly
  • Save your work regularly to prevent data loss.

Troubleshooting Common Issues

Field Validation Errors

Make sure that all the fields marked with an asterisk (*) are filled out. These are compulsory and they should contain valid data before the content can be saved or published.

Do a double check for all the fields to verify whether the data entered matches the expected format for each field type. For example, check that the dates are in the correct format (YYYY-MM-DD) and email addresses have the @ symbol in them.

Pay close attention to any red error text that appears near fields. These messages often provide specific guidance on what needs to be corrected.

Publishing Issues

Before publishing, double-check that every mandatory field has been completed. Even one missing required field can prevent publication.

Verify that your user account has the necessary permissions to publish content. Contact your Strapi administrator if you believe you should have publishing rights but can't access this feature.

A stable internet connection is crucial for publishing. If you're facing any issues, check your network connection and try again.

Component Problems

If components aren't loading correctly or behaving unexpectedly, try refreshing the page. This can often resolve temporary glitches or loading issues.

Some repeatable components or dynamic zones may have limits on the number of instances allowed. Verify you haven't exceeded these limits.

Ensure the component is correctly set up in the Content-Type Builder. Misconfigurations can lead to unexpected behavior in the content editor.

Aarya Panse
by Aarya Panse
Content Marketer

End Slow Growth. Put your Success on Steroids