Yes, you can automatically truncate CMS text in Webflow by limiting the number of characters shown on a page, using Webflow’s built-in tools or custom code if needed.
1. Use Webflow’s Built-in Text Limit Feature
- In a Collection List or template page, select the text element that connects to your CMS field (e.g., a paragraph bound to a blog post excerpt or description).
- On the right panel, under the Settings tab, find the Text Span’s character limit option.
- Toggle on “Limit number of characters”, then enter “100” (or your desired count).
This ensures only the first 100 characters display, while the full content remains stored in the CMS.
2. Use Custom JavaScript (If You Need More Control)
If you need more advanced behavior (like adding ellipses (…) dynamically or trimming without mid-word breaks), custom JavaScript is needed.
- Add an Embed element to your page.
- Use JavaScript to target the text by class name and modify its content using
substring(0, 100)
and appending …
as needed. - Be aware: this method only works after page load, and the full text is still rendered to the DOM initially.
3. Consider SEO and Accessibility
- Webflow’s native character limit modifies what’s rendered on the page, which is more SEO-friendly than hiding text via JavaScript.
- If using JavaScript, screen readers and search engines may still access the full text unless further steps are taken.
Summary
To display only the first 100 characters of a CMS field, use Webflow’s built-in character limit feature in the text element settings. For advanced formatting, custom JavaScript can be added, but native truncation is recommended for clean markup and SEO.