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:

Element Type
Field Type
What Users Can Edit

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:

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:

  1. Main Headline - Text input for the main title

  2. Subtitle - Text input for the subtitle

  3. User Count - Number input for the counter value

  4. User Label - Text input for "Active Users"

  5. Project Count - Number input for the second counter

  6. Project Label - Text input for "Projects Completed"

  7. 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 correctly

  • Ensure the element has content (for text elements)

  • Verify the HTML is properly formatted

Field Type Not Detected

  • Make sure data-type is set correctly

  • For images, ensure the element is an <img> tag

  • For counters, verify data-type="counter" is present

Label Not Showing

  • Check that data-label attribute is present

  • Ensure the label value is not empty

  • Verify there are no special characters causing issues


Editable fields make your templates more user-friendly and allow for easy customization without technical knowledge.

Last updated