RenderField in traitView does not handle null or undefined
Hi Juan, thanks for the report, yeah actually createInput requires you to return an HTML string or HTMLElement. I think it's good to have errors in cases like that but I guess the error wasn't clear enough. Honestly, I don't know what is the best "fix" here, because checking statically in the code all the API is not a...
Read full answer below ↓Question
Hi @artf! Working on the editor on one of my custom traits i had an issue where for some reason that is not important, the createInput was returning undefined. I've noticed that the TraitView renderField method does not handle falsey values It when directly to try to append an undefined object, raising an error. Should i add a validation here checking that the object is present or should i do it somewhere else? Should it be the responsibility of createInput to always return a defined object? Thanks!
Answers (3)
Hi Juan, thanks for the report, yeah actually createInput requires you to return an HTML string or HTMLElement. I think it's good to have errors in cases like that but I guess the error wasn't clear enough. Honestly, I don't know what is the best "fix" here, because checking statically in the code...
Hello @artf! Hope you are well. I am having an issue using grapesjs plugin publish s3.. How can i use that plugin and publish my data??
Thanks for reporting this, @jcamejo. The issue with RenderField in traitView does not handle null or undefined appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an inconsistent state. Wha...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5377
Error: node_modules/grapesjs/dist/index.d.ts:12551:2 - error TS1005: '?' expected. 12551 }> ? C : {}) | undefined) => (editor: Editor) => void; ~ Error: node_modules/grapesjs/dist/index.d.ts:12558:3 - error TS1005: '?' expected. 12558 }> ? C : {}) | undefined) => (editor: Editor) => void;
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? ChromeDescribe the bug After Upgrade new ver...
Issue #5175
Move method is not working as expected
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://code...
Issue #4083
Set root does not work
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Safari 15.0Reproducible demo link https://js...
Issue #3457
Custom trait input not working
Hi @artf ! Version: 0.17.3 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? The input is create...
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 Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline — both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.