Issue #2083💬 AnsweredOpened June 17, 2019by afdallah2 reactions

Model.get('toolbar') always return null

Quick answerby artf1

The extendFn was added from https://github.com/artf/grapesjs/releases/tag/v0.14.61 in the demo you're using the 0.14.57

Read full answer below ↓

Question

Hi @artf I am trying to add a custom toolbar to my custom component without changing the default toolbar. So I expect it to be like [movable, copyable, removable, newToolbar]. I use this #266 as a reference. But strangely this.get('toolbar') always return null. Is this something normal? I got this instead

Answers (3)

afdallahJuly 12, 2019

I am so sorry, it's my mistake. Thanks for your guidance

artfJuly 2, 2019

Yes, if you override the original initToolbar method the toolbar property is never created, so you have to call the parent one first. Try with this component creation helper

extendFn: ['initToolbar'], // array of model functions to extend
model: {
  // ...
  initToolbar () {

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.