Trait with [type ="number"] not working
Thanks for reporting this, @tranthanhhoa. Thanks for sharing your report about Trait with [type ="number"] not working. To help the team investigate and prioritize this: Please provide: A minimal reproducible example (CodeSandbox/JSFiddle) Your GrapesJS version number Browser and OS information Any error messages from...
Read full answer below βQuestion
Version: 0.16.27
Summary: Trait with [type ="number"] not working
Steps to reproduce: Try to type something such as "abc" for a trait which type is "number"
Expected: Don't accept the string
Actual: Still accepts the string
Answers (1)
Thanks for reporting this, @tranthanhhoa.
Thanks for sharing your report about Trait with [type ="number"] not working. To help the team investigate and prioritize this:
Please provide:
- A minimal reproducible example (CodeSandbox/JSFiddle)
- Your GrapesJS version number
- Browser and OS information
- Any error messages from the browser console
- Steps to reproduce the issue
What helps most:
- Minimal code example (not your full project)
- Screen recording or screenshot showing the issue
- Expected vs actual behavior clearly stated
- GrapesJS configuration you're using
With these details, the maintainers can identify and prioritize a fix much faster. The GrapesJS team is very responsive to well-documented issues.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4559
RTE actions are not working after the first time
Hi..!, the RTE actions are not working after the first time , when we try to apply the action on previous applied element its not working I...
Issue #3732
comment component type do not support adding traits
i am working on a script that add a trait on all the component type , but the comment type do not have the prototype object. code
Issue #3237
Add Trait For wrapper
Hi @artf I've added trait for wrapper this way. How can I perform the init function for the same Here is the code @artf Could you please he...
Issue #3500
Remove custom trait by its type.
I have created a custom trait but the name of that trait will be dynamic which is unknown. The problem is that the current removeTrait() on...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βRelated tutorials
In-depth guides on the same topic.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins β TinyMCE Inline Text Editor and Placeholder.
Tutorial
π Introducing the New GrapesJS Plugin Generator on GJS.Market
Weβre excited to announce a powerful new tool for GrapesJS developers β the GrapesJS Plugin Generator on GJS.Market!
Tutorial
Integrating GrapesJS into a Vue 3 App β Complete Guide for 2026
Build a Vue 3 landing page builder with GrapesJS and Vite. Custom blocks, composables, remote storage, TypeScript & production tips. Updated for 2026.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.