Calling render() on PanelManager breaks style manager
It occurs to me that I can just hide the button with some CSS, which is what I've done. I'm still curious about the render though.
Read full answer below βQuestion
In lieu of #540, I'm trying to manually remove a button from the options panel, with this:
let pnm = editor.Panels;
pnm.getPanel('options').get('buttons').remove(pnm.getButton('options', 'gjs-open-import-template'));
pnm.render()
This works ok, the button goes away, but the pnm.render() seems to break the style manager, in that it becomes unresponsive. Non of the other stuff seems to break, just the styling. Is this a problem I'm introducing or a bug?
Thanks!
Answers (3)
It occurs to me that I can just hide the button with some CSS, which is what I've done. I'm still curious about the render though.
This should be high priority, makes modifying panels after the first render impossible.
I'm closing this as we've removed render method from the public Panel API, it should be executed only on init by the editor. In addition, now you can remove buttons easily by doing this panelManager.removeButton('panelId', 'buttonId')
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3444
removeButton() causing error
Hi, I'm trying to remove a button from panel using this code editor.Panels.removeButton('options', 'fullscreen') . It removes the button bu...
Issue #1421
[Bug]: "disabled" instead of "active" class for Panel Button View
Hello I assume there is a bug with class when Panel Button is disabled https://github.com/artf/grapesjs/blob/dev/src/panels/view/ButtonView...
Issue #873
[Need help]: After using urlLoad from storage manager impossible to change component with Traits
Hello, I am save template to db and after loading from db impossible to change component with Traits. Video example on countdown: https://y...
Issue #1350
[BUG] render does not respond
When using the code: I would expect the panel to appear without any buttons. It does not appear to do so... [update] I switched to: Which w...
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
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.