Issue #1987πŸ’¬ AnsweredOpened April 27, 2019by fmr4111 reactions

Create toolbar in bottom

Quick answerby afdallah❀ 1

If you make that cell as a custom component, you can manipulate its View PS: this new syntax requires version 0.14.50+

Read full answer below ↓

Question

can I make a new toolbar that is located at the bottom (as shown by the cursor) when selected component? Thank's Screenshot_2

Answers (3)

afdallahβ€’ April 29, 2019

If you make that cell as a custom component, you can manipulate its View

  const comps = editor.DomComponents
  comps.addType('cell', {
    isComponent(el) {...},
    model: {...},
    view: {
      events: {
        'click #extra-toolbar': 'doSomething'
      },
      onRender() {
        const el = this.$el

        el.append(`<button id="extra-toolbar">Extra button</button>`)
      },
      doSomething() {
        alert('toolbar clicked')
      }
    }
  })

PS: this new syntax requires version 0.14.50+

fmr411β€’ April 29, 2019

not only in the cell, but for all components

afdallahβ€’ April 29, 2019

Of course, you can apply the same technique to any component.

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.