Issue #1987Opened April 27, 2019by fmr4111 reactions

[QUESTIONS] Create toolbar in bottom

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)

afdallahApril 29, 20191 reactions

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+

fmr411April 29, 20190 reactions

not only in the cell, but for all components

afdallahApril 29, 20190 reactions

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.