Ju99ernaut / grapesjs-component-code-editor

Code editor for grapesjs
MIT License
65 stars 21 forks source link

integrate this plugin into my grapejs already in place #6

Closed VConsulting closed 3 years ago

VConsulting commented 3 years ago

Hello, I am looking to integrate this plugin into my grapejs already in place.

Only I can't get him to add his panel without destroying the others If I do :

//...
  panels: {
    defaults: [
      {
        buttons: [
          //...
          {
            attributes: { title: 'Open Code' },
            className: 'fa fa-code',
            command: 'open-code',
            id: 'open-code'
          }
          //...
        ],
        id: 'views'
      }
    ]
  },
  //...

That code is present, but the other tab disappears that resets the config. How to tell him to add it?

Ju99ernaut commented 3 years ago

You can add it to the panels using the same method in index.html.

https://github.com/Ju99ernaut/grapesjs-component-code-editor/blob/5a85578279355836081a1aaabcf50a9ddaa4e900/index.html#L107-L119