Traits are not created by default if not requested, indeed I'm doing this in the demo https://github.com/artf/grapesjs/blob/gh-pages/demo.html#L1407-L1408
Question
Traits are not created by default if not requested, indeed I'm doing this in the demo https://github.com/artf/grapesjs/blob/gh-pages/demo.html#L1407-L1408
Originally posted by @artf in https://github.com/artf/grapesjs/issues/1627#issuecomment-445216188
Hello artf can you please give here proper example how we can request for Traits
Answers (1)
const openTmBtn = editor.Panels.getButton('views', 'open-tm');
openTmBtn && openTmBtn.set('active', 1);
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1391
Property slider view default unit
Hey @artf , thanks for the enhancement! The implementation works as expected with some properties (font-size, border-radius, ...), but not...
Issue #3778
Select options are not displaying - new anomaly
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeReproducible demo link https://github....
Issue #3413
Adding inline scripts and updating old events
In that case, I suggest you access the document of the iframe and to append manually the inline script (to get the document use editor.Canv...
Issue #2967
WARNING: Plugin grapesjs-style-gradient not found
https://github.com/artf/grapesjs/issues/1156 It's actually a browser console warning not an error: "index.js?08a9:70 Plugin grapesjs-style-...
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
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Tutorial
How We Built Composeit in Record Time Using GrapesJS Shadcn
Bypass foundational builder boilerplate and focus on what truly matters.
Tutorial
GrapesJS custom components guide (2026)
Define custom GrapesJS components with DomComponents.addType: detection with isComponent, a model with traits and defaults, and a view for canvas behavior.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.