Issue #538💬 AnsweredOpened November 17, 2017by Geczy0 reactions

Clicking component always opens styles first, even if I override

Quick answerby artf

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

Read full answer below ↓

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)

GeczyNovember 20, 2017

Good thinking, thanks ! Overwrote it in .init before render

lock[bot]September 18, 2019

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.