Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single File vue Component example #81

Closed
panayotisk opened this issue Nov 5, 2018 · 5 comments
Closed

Single File vue Component example #81

panayotisk opened this issue Nov 5, 2018 · 5 comments

Comments

@panayotisk
Copy link

Is it possible to have an example of using our ready SFCs when creating out extensions? I saw the Iframe sample and I was wondering how to do something like it using an SFC.

@philippkuehn
Copy link
Contributor

Hey @panayotisk! You can already do that.

import { Node } from 'tiptap'
import CustomComponent from './CustomComponent.vue'

export default class CustomNode extends Node {

	get name() {
		return 'custom_node'
	}

	get view() {
		return CustomComponent
	}

}

@panayotisk
Copy link
Author

@philippkuehn is there also a way to set the SFC component's parent? I need to access the vuex store and it would also be helpful to see its properties in chrome dev tools as is suggested here: buefy/buefy#55 (comment)
Or should I use a different approach?

@philippkuehn
Copy link
Contributor

A good point. Didn't know that!

@philippkuehn philippkuehn reopened this Nov 5, 2018
@philippkuehn
Copy link
Contributor

I added this parent option in tiptap@0.20.0. Thanks for the hint!

@panayotisk
Copy link
Author

Great! Thank you for that.

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

No branches or pull requests

2 participants