Issue #1084💬 AnsweredOpened May 4, 2018by dsgh0 reactions

Bind handleAdd so that implementors can get a reference

快速解答by artf

Totally agree about the consistency 👍

Read full answer below ↓

Question

I've marked as a bug just because I think this reflects a minor inconsistency; but it could also be understood as a feature request.

The scenario is:

  • I'm providing my own methods for uploadFile and handleAdd, which is something that's possible today.
  • I can see that uploadFile has been bound to its parent object, allowing me to get a handle of the editor object by doing: this.config.em.get('Editor') inside my method, which is cool.
  • But, I cannot do the same for handleAdd. I'd like to be able to do the same - and it'd be more consistent, I believe.

As an alternate solution, the editor could be passed as the last param of both those methods - I'm fine with that as well, let me know if that's preferred instead.

Answers (2)

artfMay 5, 2018

Totally agree about the consistency 👍

lock[bot]September 17, 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.