Clicking component always opens styles first, even if I override
Question
When I click the component, I want the traits to open
view: defaultType.view.extend({
events: {
click: e => {
editor.Panels.getButton('views', 'open-sm').set('active', false)
editor.Panels.getButton('views', 'open-tm').set('active', true)
},
Clicking a component opens the styles. Clicking it one more time will finally open open-tm the traits manager.
How do I override opening styles on click?
Answers (3)
Hey Matt, probably you're using the code from the demo and therefore you're conflicting with this https://github.com/artf/grapesjs/blob/gh-pages/js/grapesjs-preset-webpage.js#L257-L268 just try to remove that part
Good thinking, thanks ! Overwrote it in .init before render
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #454
Make block manager default open panel?
I tried this code: It works but doing this will hide the device selector in the top left for some reason.
Issue #1995
[QUESTION] Binded events are not being loaded (Just work properly on mozilla firefox)
So I am using local Storage. I added some events to the component this way. Every time I add the component it works just fine. However, If...
Issue #714
Open Style Manager when selecting an element
trying to do this gives the error this.sender.get is not a function grapesjs.min.js toggleSm Basically I want to open the style manager whe...
Issue #1448
Child component not selectable when using custom view
I'm trying to create a custom component that creates it's own view with nested HTML. I do not want this HTML to be rendered as a component...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.