Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

Example doesn't work without importing MobiledocButton #6

Closed
mccallofthewild opened this issue May 7, 2017 · 2 comments
Closed

Example doesn't work without importing MobiledocButton #6

mccallofthewild opened this issue May 7, 2017 · 2 comments

Comments

@mccallofthewild
Copy link

The basic usage example threw this error:

[Vue warn]: Unknown custom element: <mobiledoc-button> - did you register the component correctly? For recursive components, make sure to provide the "name" option. 

The fix was easy. I just imported & registered the button component too.

  import { MobiledocEditor, MobiledocToolbar, MobiledocButton } from "vue-mobiledoc-editor"

  export default {
    components: {
      MobiledocEditor,
      MobiledocToolbar,
      MobiledocButton
    }
  }

Not a major issue, but an update to the docs might be good. 👍

@alidcast
Copy link
Owner

alidcast commented May 7, 2017

That's strange, I would imagine that it would be sufficient for the MobiledocToolbar component to register its MobiledocButton. Were you using the mobiledoc button separately as well?

Either way, this plugin is going to undergo an API change soon since [email protected] released provide/inject capabilities for functional components (see issue #3), which will make the MobiledocEditoreasier to use and maintain.

I'm closing this issue since I will be working on the docs after that change. But thanks for bringing this up, it's always helpful to make sure documentation is accurate.

@alidcast alidcast closed this as completed May 7, 2017
@alidcast
Copy link
Owner

@mccallofthewild I ended up not changing the plugin to using provide and inject as it was not possible (vuejs/vue#5194).

But I fixed the issue you raised and updated docs!

Thanks again

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants