Editable Fields
Learn how to make your template elements editable so users can customize content without touching HTML.
Overview
Editable fields allow users to modify template content through a user-friendly interface instead of editing HTML directly. When you add data-editable="true" to an element, it becomes available in the template editor for easy customization.
Making Elements Editable
Basic Editable Text
To make any text element editable, add the data-editable="true" attribute:
<div data-type="text"
data-editable="true"
data-animate="fade"
data-start="0"
class="text-4xl font-bold text-white">
Your editable text here
</div>Custom Field Labels
Use data-label to give your editable fields descriptive names:
Supported Element Types
Text Elements
Any text element can be made editable:
Typewriter Elements
Make typewriter text editable for dynamic messaging:
Counter Elements
Allow users to customize counter values:
Image Elements
Make images editable so users can change the source:
Field Types and Behavior
The template editor automatically detects the field type based on the element:
data-type="text"
Text Input
Text content
data-type="typewriter"
Textarea
Typewriter text
data-type="counter"
Number Input
Target number value
img
Text Input
Image URL
Best Practices
1. Use Descriptive Labels
Always provide meaningful data-label values:
2. Provide Default Content
Include meaningful default text that users can modify:
3. Group Related Fields
Use consistent labeling for related fields:
4. Consider Field Order
Fields appear in the editor in the order they appear in your HTML:
Complete Example
Here's a complete template with multiple editable fields:
Template Editor Interface
When users open this template in the editor, they'll see:
Main Headline - Text input for the main title
Subtitle - Text input for the subtitle
User Count - Number input for the counter value
User Label - Text input for "Active Users"
Project Count - Number input for the second counter
Project Label - Text input for "Projects Completed"
Company Logo - Text input for the logo URL
Advanced Usage
Conditional Editing
You can make some fields editable while keeping others static:
Mixed Content
Combine editable and static content in the same element:
Troubleshooting
Field Not Appearing in Editor
Check that
data-editable="true"is set correctlyEnsure the element has content (for text elements)
Verify the HTML is properly formatted
Field Type Not Detected
Make sure
data-typeis set correctlyFor images, ensure the element is an
<img>tagFor counters, verify
data-type="counter"is present
Label Not Showing
Check that
data-labelattribute is presentEnsure the label value is not empty
Verify there are no special characters causing issues
Related Topics
Template Editor - How to use the Template Editor interface
Widget Reference - Complete widget documentation
Getting Started - Basic template creation
Template Examples - Real-world examples with editable fields
Editable fields make your templates more user-friendly and allow for easy customization without technical knowledge.
Last updated