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:
Open your web browser and navigate to your Strapi admin panel (typically `your-domain/admin`)
Log in using your administrator credentials
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:
Select your desired collection type from the left sidebar
Click the "Create new entry" button in the top right corner
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:
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.
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).
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.
Dates: Use the date picker or type in YYYY-MM-DD format
Boolean: Toggle between True/False
Email: Enter valid email addresses
Password: Input sensitive information securely
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.
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
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
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
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.
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
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
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.
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
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
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.