• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
sistrall

sistrall

datocms-plugin-character-counter-example

Val.town porting of the character-counter plugin
Remix of jxnblk/react-spa-starter
Public
Like
datocms-plugin-character-counter-example
Home
Code
4
FieldExtension.tsx
README.md
client.tsx
H
http.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
http.tsx
https://sistrall--019a917e148a77d289fb0fa1a00a694c.web.val.run
README.md

DatoCMS Character Counter Plugin

A DatoCMS plugin that automatically shows a character counter on fields that are configured to have validations on length.

Features

  • Automatic activation: The plugin automatically attaches to fields with length validators
  • Manual installation: Can also be manually added to fields
  • Multiple field types: Supports string, text, and structured_text field types
  • Smart counting: For structured text, counts only the actual text content (not markup)

Supported Field Types

  • Single-line string
  • Multiple-paragraph text
  • Structured text

How it works

The plugin uses the overrideFieldExtensions hook to automatically add a character counter addon to fields that:

  1. Are one of the supported field types (string, text, or structured_text)
  2. Have length validation configured
  3. Don't already have the character counter addon installed

The counter displays the current character count in a small, unobtrusive format below the field.

Implementation

Based on the official DatoCMS character-counter plugin.

HTTP
  • http.tsx
    sistrall--01…4c.web.val.run
Code
FieldExtension.tsxREADME.mdclient.tsx
H
http.tsx
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.